Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

rxp03570
New Contributor III

0 Lines fetched Qlik Sense SQL Query

Hi All,

I'm trying to import data from Oracle (Toad), using a select statement - When I pass one or two account in where I get the output. When I try to pass around 10 or more it doesn't fetch any records. It just fetches 0 lines - Not sure what the issue is .

My Statement ends with where c.account_id IN (222,333,444,555,666,777,888,999,1111,2222).

Any idea why the query does not fetch any records?. - Please find attachment for log file.

15 Replies
undergrinder
Valued Contributor II

Re: 0 Lines fetched Qlik Sense SQL Query

Hi Rahul,

It seems it is not Qlik related problem.

The syntax of your where condition seems OK, there is no reason why you get rows when: where c.account_id in = (1,2) and don't get any rows at where c.account_id in (1,2,3,4,5,6,7,8,9,10)

There should be other problem.

G.

arvind654
Honored Contributor II

Re: 0 Lines fetched Qlik Sense SQL Query

Debug & click on output the app to see line by line if it is fetching records?

rxp03570
New Contributor III

Re: 0 Lines fetched Qlik Sense SQL Query

I did try it in debug mode, it just does not fetch any records.

arvind654
Honored Contributor II

Re: 0 Lines fetched Qlik Sense SQL Query

In Toad does this query gives you 0 records?

I do not know much about SQL but I'd suggest breaking down the table and see where it is not fetching records?

Since you are doing quite a few If else, where conditions etc...

xufei123
Valued Contributor

Re: 0 Lines fetched Qlik Sense SQL Query

Don't you need to include 3120 in the list?

afroz_shaik
New Contributor III

Re: 0 Lines fetched Qlik Sense SQL Query

I guess you have to end your statement with semicolon ;

rxp03570
New Contributor III

Re: 0 Lines fetched Qlik Sense SQL Query

Thanks for the reply, but it doesn't seems to work.

rxp03570
New Contributor III

Re: 0 Lines fetched Qlik Sense SQL Query

For just 2 accounts it does fetch records, when I add three or more accounts in the IN condition it doesn't fetch any record - It just loops out of the query.

rxp03570
New Contributor III

Re: 0 Lines fetched Qlik Sense SQL Query

No that one was just a test.