Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.
Originally posted by: nidpatelHi all,
I'm facing the similar problem and trying to use the below solution but it's giving me 0 record in output(query runs without error). However, while running the query in Sqldeveloper, I know the output shouldn't be zero.
sqlQuery = strcat("SELECT Address,':1' as Name FROM table WHERE name = :2")
sqlSelect(1,sqlQuery,'names','names')
[/QUOTE]
here's what I'm trying to do. I need data from a table1 where ID is in 'Run_ID'
Input:
Run_ID
('i1','i2','i3')
('i4','i5','i6','i7')
and so on..
my query:
sqlquery = strcat("select NAME, ADDRESS, ID from TABLE1 where ID =:1")
sqlselect(1,sqlquery,'Run_ID')
The query runs fine but gives me 0 rec in output.
However, when I use below query, it works and give me desired output. But only if I give just one line in input.
e.g. input:
Run_ID
('i1','i2','i3')
my query: sqlSelect(
1,strcat("select NAME, ADDRESS, ID from TABLE1 where ID in (",Run_ID,")
"))
If I pass multiple lines in input, it doesn't work.
Please help.