Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

passing variable to sql when variable values >1000

Hi All,

i have specific requirement to connect to multiple database where my first database gives me actual data and from this data i need to take a columns values and pass it on to my second database and check if these records are present.

example

US DB                    INDIA DB

Column A

ABC1           need to check if ABC1 ,ABC2, ABC3, ABC4 are present in this database

ABC2

ABC3

ABC4


i was able to do a peek and get the values in to a temp variable

Now the problem is if the values are more than 1000 oracle database doesn't allow me to pass it in "Where " clause .

i need to parse the strings upto 999 and then loop it accordingly for the rest

3 Replies
ogautier62
Specialist II
Specialist II

Hi,

you could load your column from your second database :

indianDB :

load distinct columnB as columnA ......... from your indianDB

then :

inner join (table USDB) load column A resident indianDB

so only code present in indianDB will remain in USDB and no where claure

regards

Anonymous
Not applicable
Author

Thanks for responding

we can do a query on the second(Indian DB), But the result will be too huge and time taken for the retrieval is also very high. So still thinking any other alternatives or easier way to limit the variable to 999 and pass it to the second DB

ogautier62
Specialist II
Specialist II

Hi,

in this case it's an Oracle problem not Qlik

the only way I know is to create a tempory table and make a join with this in Oracle