Skip to main content

Connectivity & Data Prep

Discussion board where members can learn more about Qlik Sense Data Connectivity.

QlikWorld 2023, a live, in-person thrill ride. April 17 - 20, 2023, in Las Vegas! REGISTER TODAY
Showing results for 
Search instead for 
Did you mean: 
Contributor II
Contributor II

Rename field in SQL query and not in LOAD

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;

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)

1 Reply

Try correcting the quotes like:

LOAD customer_id, gender;

SELECT "id" as "customer_id","gender"
FROM "public"."table";