Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Say I have the following database table
id | gender
--+------------
1 M
2 F
I want to change the name in the SQL-query and *not* in the LOAD query i.e
LIB CONNECT TO 'database';
LOAD customer_id, gender;
[my_table]:
SELECT "id as customer_id","gender"
FROM "public"."table";
but I get a load-error since "customer_id" is not found.
(note above is just for illustration purpose, the original query is way more complex thus the renaming has to be in the SQL-query and not the LOAD-statement)
Try correcting the quotes like:
LOAD customer_id, gender;
[my_table]:
SELECT "id" as "customer_id","gender"
FROM "public"."table";