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

RE: [sqr-users] LOAD-LOOKUP: Using BETWEEN in WHERE clause



The $account value will change for each input record passed to the Lookup and 
will be the key for the lookup.  The initial LOAD-LOOKUP to build the array 
will not contain a where clause.  Can I have dynammic WHERE clause passed to 
LOOKUP or must this be done using database SELECT?
 
Thanks to all.


Bruce Kelling <Bruce_Kelling@advantechsolutions.com> wrote:
Yes, many allowable combinations in all lookup field values. Use quotes and
sometimes variables to build whatever you want.

Try This:

let $Value_Where = $account || ' BETWEEN COLUMN_FROM
AND COLUMN_TO '

Load-Lookup
Name = VALUE_LOOKUP
Rows = 2000
Table = Table_Name
Key = Key_Field
Return_Value = Return_Field
Where=$Value_Where 


Bruce


-----Original Message-----
From: Yuri Lakef [mailto:lakef250@yahoo.com] 
Sent: Monday, May 19, 2003 1:23 PM
To: sqr-users@sqrug.org
Subject: [sqr-users] LOAD-LOOKUP: Using BETWEEN in WHERE clause



Hello.

Is it allowable to pass an SQR variable to use in a BETWEEN of the WHERE
clause of a LOAD-LOOKUP?

For example, I'd like to model the following SQL:

SELECT VALUE
FROM TABLE
WHERE $account BETWEEN COLUMN_FROM
AND COLUMN_TO



Thank you!


---------------------------------
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.

_______________________________________________
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

---------------------------------
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.

_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users