[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Dynamic Where Clause IN Sql Statement
- Subject: Dynamic Where Clause IN Sql Statement
- From: Sam Hucks <ramstor@HOTMAIL.COM>
- Date: Wed, 9 Jun 1999 15:57:18 PDT
Hi Everybody
I am working on SQR 3.x Sco UNix Oracle 7.3.3
I am developing a custom SQR where i need to write a sql
select statement with a dynamic where clause .
for eg my select statement can be any of these . Depending on the
user input it has to change dynamically .
1)select * from table_name where business_unit = $business_unit
and post_status_ap in ('P','U','N') AND etc .
2)select * from table_name where business_unit = $business_unit
and ledger in ('ORG','AMD') AND scenario = 'FINAL'
So How to put the where clause in a variable and how to correlate it with
the select statement .
Also i seem to have a problem due to the single quote values
within the dynamic where clause which is to be stored in a variable
I am really in an emergeny in that i have to finish this early
I will appreciate any help regarding this
Thanks
Sam .
_______________________________________________________________
Get Free Email and Do More On The Web. Visit http://www.msn.com