WHERE condition as a parameter
Moderators: chulett, rschirm, roy
WHERE condition as a parameter
Hi,
I have a requirement to extract data from source tables - for that i am using ODBC EE start. requirement is to pass the where condition as a parameter . I am getting SQL0401N when i pass where condition using IN but when i hard code the same query using IN statement it works fine.
Any workaround to overcome this issues?
Thanks
I have a requirement to extract data from source tables - for that i am using ODBC EE start. requirement is to pass the where condition as a parameter . I am getting SQL0401N when i pass where condition using IN but when i hard code the same query using IN statement it works fine.
Any workaround to overcome this issues?
Thanks
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
A Search of DSXchange will suggest that what you want to do is not easily possible, though it IS possible to pass the entire SQL statement as a parameter and to use that as user-defined SQL.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Hi Ray,
I did not search before posting it but i could find only one posting with the same error message.
I tried to provide entire sql statement as a parameter by defining User defined SQL in ODBC section, i am still getting same error message.
Here is sample of sql
select * from table where col1 in ('a', 'b', 'c')
Thanks,
I did not search before posting it but i could find only one posting with the same error message.
I tried to provide entire sql statement as a parameter by defining User defined SQL in ODBC section, i am still getting same error message.
Here is sample of sql
select * from table where col1 in ('a', 'b', 'c')
Thanks,
Add another job parameter COND
Code: Select all
(#COND# = 'LT' AND COL1 < COL2) OR
(#COND# = 'GT' AND COL1 > COL2) OR
You are the creator of your destiny - Swami Vivekananda