Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Experts,
Can any one Please help me on this.
From the below script how to pass QLIK from Table name into a New Application Field.
LIB CONNECT TO 'Remedy-ODBC64 (John)';
LOAD
Client,
Date,
START TIME,
END TIME;
[PROD_QLIK]:
SELECT Client,
Date,
START TIME,
END TIME
FROM "USER"."PROD_QLIK";
Please help me on how to do this.
Thanks in advance.
Like this?
:
FOR EACH vTable IN 'PROD_QLIK', 'PROD_TABLEAU', 'PROD_BIGDATA'
[$(vTable)]:
NOCONCATENATE
LOAD SubField('$(vTable)', '_', 2) AS CurrentTableName, *;
SQL SELECT * FROM "USER"."$(vTable)";
NEXT
:
Don't forget to move your discussion.
Hi Bhavani,
LIB CONNECT TO 'Remedy-ODBC64 (John)';
[Prod]:
LOAD
Client,
Date,
START TIME,
END TIME;
[PROD_QLIK]:
SELECT Client,
Date,
START TIME,
END TIME
FROM "USER"."PROD_QLIK";
Here as per the Qlik standards we call [Prod] is the Table name ,so i hope your Database team is created like "PROD_Qlik " it means Prod table related to Qlik Reporting tool /Table.
If i miss understand your query please correct me.
There is a script function called TableName() that returns the name of a specific table. Unfortunately, you can't use it to return the name of the table that you are currently LOADing.
As an alternative, and on condition that you can prepare a list of names of tables to extract, you could use a FOR loop to extract and tag them all at once. For example:
:
FOR EACH vTable IN 'PROD_QLIK', 'PROD_TABLEAU', 'PROD_BIGDATA'
[$(vTable)]:
NOCONCATENATE
LOAD '$(vTable)' AS CurrentTableName, *;
SQL SELECT * FROM "USER"."$(vTable)";
NEXT
:
Best,
Peter
PS Why post a Qlik Sense question in a forum called "New to QlikView"? To move your discussion to New to Qlik Sense, see here: QlikCommunity Tip: How to move your discussion thread
Qlik already have a standard system field
$Table
Like this?
:
FOR EACH vTable IN 'PROD_QLIK', 'PROD_TABLEAU', 'PROD_BIGDATA'
[$(vTable)]:
NOCONCATENATE
LOAD SubField('$(vTable)', '_', 2) AS CurrentTableName, *;
SQL SELECT * FROM "USER"."$(vTable)";
NEXT
:
Don't forget to move your discussion.
Thank you.. Its working..
I have moved to Qliksense.