Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld happening right now! You can still join: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
anchalkataria
Contributor III
Contributor III

Load tables dynamically from SAS

Hi All,

I need to load table name from SAS dynamically. I used the below statement for loading from SQL server.

SELECT "TABLENAME"

FROM P*****T.P*****H."_v_table" ;

But when i m using the same _v_table and tablename with SAS, i m getting the following error :

ODBC error

Connector reply error: SQL##f - SqlState: S1000, ErrorCode: 4294967295, ErrorMsg: [SAS][SAS ODBC Driver][SAS Server] SPDS_NOTE: Correct Syntax for select expression is:



Can someone please let me know what is the exact syantax i should use to get all the tablename.

Thanks!!

1 Solution

Accepted Solutions
anchalkataria
Contributor III
Contributor III
Author

Hi Petter,

Thanks for your response.

I am loading data from SAS and SQL tables did not work from me.

Fortunately i found a solution which gives me exact what i wanted.

SQL SELECT MEMNAME

FROM X*******Z.DICTIONARY.TABLES


MEMNAME : contains all the table names

DICTIONARY.TABLES : is the metadata

make sure to use this in CAPITAL letters.

Thanks!!

View solution in original post

2 Replies
petter
Partner
Partner

The generic method to get the meta data information when your are using ODBC is to use the statment:

SQLTables;

This will as a single word statement extract all the tables metadata available through the ODBC connection you already have connected to. Have a look here for further info: SQLTables ‒ QlikView

SQLColumns;

will give you the additional column names and column info that could be used too if you need.

More info here: SQLColumns ‒ QlikView

anchalkataria
Contributor III
Contributor III
Author

Hi Petter,

Thanks for your response.

I am loading data from SAS and SQL tables did not work from me.

Fortunately i found a solution which gives me exact what i wanted.

SQL SELECT MEMNAME

FROM X*******Z.DICTIONARY.TABLES


MEMNAME : contains all the table names

DICTIONARY.TABLES : is the metadata

make sure to use this in CAPITAL letters.

Thanks!!