[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



 --- "Turner, Ivan" <Ivan.Turner@qwest.com> a écrit : 
> 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?
> 

Nope...

Think of big systems like Oracle and so on :
1. You write a query
2. You run (execute) it
3. If the query is SELECT then you may fetch through the cursor (the data).

You can change the value of the $credit_class variable, but unless you re-run 
the query (i.e. in
SQR : passing the BEGIN-SELECT statement), the cursor will not be updated.

You can either call again your procedure once the variable is updated, or, 
write another
procedure... I never tried to do recursive calls with SQR, and I'm not sure it 
is good idea (just
because the local/global memory areas management which is quiet strange... and 
the cursors seam to
be globals).

Charly


        

        
                
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