Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

NoOfTables() function is not returning a true value

Hi guys,

I have this script :

LIB CONNECT TO 'DEV1-PC-MSSQLSERVER2014 (desktop-dpummb2_yaman)';

newdata:

SQL select * from ComplexType;

base:

Generic LOAD

       ParentID,Name,ID;

when i call NoOfTables() i got (1) rather than 10 generic tables + original one called newdata

p2.pngswuehl

stalwar1

8 Replies
petter
Partner - Champion III
Partner - Champion III

I tested on my Qlik Sense November 2017 with my own test file. The result was correct for NoOfTables() being called at the end of my script.

Which version of Qlik Sense are you using? Could you provide your entire script or at least the portion that includes the LOAD and the following call to the NoOfTables() function?

Anonymous
Not applicable
Author

LIB CONNECT TO 'DEV1-PC-MSSQLSERVER2014 (desktop-dpummb2_yaman)';

SQL select * from ComplexType;

Generic LOAD 

ParentID,Name,ID;

  

// com:

// load * from [lib://personal (desktop-dpummb2_yaman)/Persimmon/Persimmon1.qvd];     

      

  Set vListOfTables1 = ;

   let Nof.list=0;

   //initialize the lists which each one will contain tables have the same Key

   for c=1 to 4

   let list$(c)=" ";

  next c;

 

  let u=NoOfTables(); //i get here 1

Anonymous
Not applicable
Author

i am using Qlik Sense Server 2017

also i have tested with other app the result was correct but here not working !!!!

swuehl
MVP
MVP

What is the source of your generic load?

Since you have commented out the QVD LOAD, I can't see a valid source.

Maybe this explains your missing table count.

Anonymous
Not applicable
Author

the source is Sql server 2014

the data is one table called ComplexType

after loading data from there as generic load it considers the original table only.

swuehl
MVP
MVP

No, I am talking about this script statement:

Generic LOAD

ParentID,Name,ID;

This LOAD statement needs a table source, i.e. a FROM ... or RESIDENT ...

(Or a subsequent LOAD statement, i.e. it works as preceding LOAD on another LOAD).

Maybe your script you've posted is not the one you've actually used in your test or you posted it incomplete.

Please recheck and post your complete relevant script.

Anonymous
Not applicable
Author

Yes thanks Mr. Stefan.

Firstly i connected to Sql server using this statement :LIB CONNECT TO 'DEV1-PC-MSSQLSERVER2014 (desktop-dpummb2_yaman)';

after that i want to create generic tables using that sql source which actually has one table called Complex type but really i dont know how can type that after this statement

Generic LOAD

ParentID,Name,ID;

From ???

swuehl
MVP
MVP

See your other thread (in short, use SELECT).

I would appreciate keeping one issue to one thread, though.