Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

syntax alias table

Hello,

I need to select data from one table double in my script. The field names will receive a alias name. But how can I select from the same table twice. I need to use a alias table. What is the syntax for that?

1.run: select table1.field1, field2, field3 from table1

2.run: ?? select table1a.field1as field1a, field2 as field2a, field3 as field3a from table1 as table1a ??

1 Solution

Accepted Solutions
Not applicable
Author

perfect, it works

Thank you

Bernd

View solution in original post

2 Replies
eiconsulting
Partner - Creator II
Partner - Creator II

The name of the table in QV is what you put before the load (or SELECT where the LOAD is implicit). Then you can load as many times you want the same SQL table, even if I wonder if there wouldn't be a better solution for what you want to do.

Flavio

Example

MyTable1:
SELECT
field1,
field2,
field3
from table1

MyTable2:
SELECT
field1 AS field1b,
field2 AS field2b,
field3 AS field3b,
from table1

Federico Sason | Emanuele Briscolini
Not applicable
Author

perfect, it works

Thank you

Bernd