Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

yamananalytic
Contributor II

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

Tags (1)
8 Replies
MVP
MVP

Re: NoOfTables() function is not returning a true value

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?

yamananalytic
Contributor II

Re: NoOfTables() function is not returning a true value

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

yamananalytic
Contributor II

Re: NoOfTables() function is not returning a true value

i am using Qlik Sense Server 2017

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

MVP
MVP

Re: NoOfTables() function is not returning a true value

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.

yamananalytic
Contributor II

Re: NoOfTables() function is not returning a true value

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.

MVP
MVP

Re: NoOfTables() function is not returning a true value

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.

yamananalytic
Contributor II

Re: NoOfTables() function is not returning a true value

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 ???

MVP
MVP

Re: NoOfTables() function is not returning a true value

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

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

Community Browser