[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
RE: [sqr-users] dynamic sql
- Subject: RE: [sqr-users] dynamic sql
- From: "Turner, Ivan" <Ivan.Turner@qwest.com>
- Date: Mon, 30 Aug 2004 10:04:39 -0500
- Delivery-date: Mon, 30 Aug 2004 10:07:12 -0500
- List-id: "This list is for discussion about the SQR database reportinglanguage from Hyperion Solutions." <sqr-users.sqrug.org>
- Thread-index: AcSOZqCQGaIX+1jESaKWvBT6Btu6igAO5bAQ
- Thread-topic: [sqr-users] dynamic sql
Thank you. What I'm doing is changing the value of $credit_class inside the
select loop. I was wondering if the cursor gets setup first and allows me to
change the value of $credit_class inside the select loop.
Again, I'm changing the value of $credit_class inside the select loop. Is that
legal?
-----Original Message-----
From: sqr-users-bounces+ivan.turner=qwest.com@sqrug.org
[mailto:sqr-users-bounces+ivan.turner=qwest.com@sqrug.org] On Behalf Of Charly
Lebrun
Sent: Monday, August 30, 2004 3:54 AM
To: This list is for discussion about the SQR database reporting languagefrom
Hyperion Solutions.
Subject: Re: [sqr-users] dynamic sql
Hello Ivan,
Didi you try something like :
> WHERE P.AR_CUST_TYPE_L = $credit_calss ?
(perhaps it should be $credit_class ;-)
You can mix in the query the SQR variables and the SQL statements. That
possibly one of the
reasons why SQR uses '$', '#' and such identifiers for the variables : it
allows the interpreters
to recognize the SQR and the SQL variables.
I hope I did answer correctly...
Charly
--- "Turner, Ivan" <Ivan.Turner@qwest.com> a écrit :
> When I enter this procedure, $credit_calss is set to 'GG'. If I return
> any rows in the query, I want to reset $credit_calss to 'A' then call
> another procedure where the credit class needs to be 'A'. Is it
> possible to change the value of a where clause variable ($credit_calss )
> in SQR?
>
>
>
> begin-SELECT ON-ERROR=SQL-Error
>
> /*+ index(P PSMCUSTOMER) index(I PS_CUST_CREDIT) */
>
> I.CUST_ID
>
> let #misassigned_accounts = #misassigned_accounts + 1
>
> show &i.cust_id ' in in credit class GG with no associated federal
> GAG'
>
> show 'Account being set to credit class A and customer type GB'
>
> Let $credit_class = 'A'
>
> do 250-update-ps-customer
>
> do 325-insert-credit-classFROM PS_CUST_CREDIT I, PS_CUSTOMER P
>
> WHERE P.AR_CUST_TYPE_L IN ('GG','GO')
>
> and I.SETID = 'LCI'
>
> AND I.CUST_ID = P.CUST_ID
>
> AND I.EFFDT = (SELECT MAX(EFFDT)
>
> FROM PS_CUST_CREDIT
>
> WHERE SETID = I.SETID
>
> AND CUST_ID = I.CUST_ID)
>
> AND I.CREDIT_CLASS = $credit_class
>
> MINUS
>
> SELECT TO_CHAR(MEMBER_ID)
>
> FROM GROUP_MEMBERS
>
> WHERE GROUP_ID IN (32319,32320,33236,35016,35017)
>
> end-select
>
> _______________________________________________
> sqr-users mailing list
> sqr-users@sqrug.org
> http://www.sqrug.org/mailman/listinfo/sqr-users
>
Vous manquez d'espace pour stocker vos mails ?
Yahoo! Mail vous offre GRATUITEMENT 100 Mo !
Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/
Le nouveau Yahoo! Messenger est arrivé ! Découvrez toutes les nouveautés pour
dialoguer instantanément avec vos amis. A télécharger gratuitement sur
http://fr.messenger.yahoo.com
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users