Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Renaming SQL tables in QV

I am new to QlikView, so I apologize if this is an easy syntax question. I am loading data using a SQL Select statement that joins two tables and I want to then reference the query results set as a table in QlikView. It appears that QV names the result using the first table in the query, appended with a right parenthesis , e.g., ABT_BASELINE_MILESTONES) . Is there a way to rename the resulting dataset with a new table name in QV?

1 Solution

Accepted Solutions
johnw
Champion III
Champion III

[My New Table Name]:
LOAD *
;
SQL
SELECT Something, SomethingElse
FROM SomeTable
WHERE SomeValue > 50
;

I believe the LOAD *; isn't technically necessary, but I always include it.

View solution in original post

3 Replies
Not applicable
Author

This is an example with qvd files but it is the same with SQL query. Or you have the choise to store the tables to qvd files and then do the join. In the following example you refer to the joined tables as 'Items' which is used to store the file to a new qvd.
LOAD item_id,
item_descr,
cat001_id

FROM
C:\Dim_Items.qvd
(
qvd);

left join
LOAD cat001_id,
descr

FROM
C:\ProdGroup.qvd
(
qvd);

Store Items into C:\Items.qvd (qvd);
DA
Items:
johnw
Champion III
Champion III

[My New Table Name]:
LOAD *
;
SQL
SELECT Something, SomethingElse
FROM SomeTable
WHERE SomeValue > 50
;

I believe the LOAD *; isn't technically necessary, but I always include it.

Not applicable
Author

Thanks, John, this is exactly what I needed. -Scott