[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

RE: [sqr-users] SQL question - establishing variables in Select



Use the SHOW or DISPLAY SQR commands to show the value that is going in to
the variable:

display &a.name
or
show &a.name


José A. Aguirre



-----Original Message-----
From: MBAUTIGER@aol.com [mailto:MBAUTIGER@aol.com]
Sent: Sunday, November 03, 2002 12:35 PM
To: sqr-users@sqrug.org
Subject: [sqr-users] SQL question - establishing variables in Select


Hi,

When establishing variables from select statements how do you know what
results will be put into the variables.  Meaning if the select statement
returns multiple rows how does the SQR determine which values to store in
the variables.  

i.e.

BEGIN-SELECT
a.name
a.id

   let $name        = &a.name
   let $id        = &a.id
          
from ps_table1 a
where a.date = $date !$date established in previous routine
END-SELECT

I realize you should make this select return only one row, but say it
returned multiple rows what values would go into the variables.  We are on
Oracle.

Thanks.

_______________________________________________
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