Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
orital81
Contributor III

Priority ERP : Select Tables Keys From SQL Server

Hi, Im using Incremental load to update QlikView from Priority ERP connected to SQL Server DB.

A part of the script requires the table key

I would like to build an automated program that will select all tables keys

in order to use it in my incremental load script

I have found an SQL that suppose to do the job but I get only a few tables and they aren't Priority tables


SQL SELECT 

    i.name AS IndexName,        

    OBJECT_NAME(ic.OBJECT_ID) AS TableName,        

    COL_NAME(ic.OBJECT_ID,ic.column_id) AS ColumnName

FROM    sys.indexes AS i INNER JOIN   sys.index_columns AS ic ON  i.OBJECT_ID = ic.OBJECT_ID AND i.index_id = ic.index_id

WHERE   i.is_primary_key = 1;

Can someone please tell me what am I doing wrong?


Thanks for your help


Ori

Community Browser