Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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 ??
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
perfect, it works
Thank you
Bernd