<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Rename field in SQL query and not in LOAD in Connectivity &amp; Data Prep</title>
    <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Rename-field-in-SQL-query-and-not-in-LOAD/m-p/1876952#M10040</link>
    <description>&lt;P&gt;Say I have the following database table&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;id |   gender 

--+------------

1       M

2      F&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to change the name in the SQL-query and *not* in the LOAD query i.e&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;LIB CONNECT TO 'database';

LOAD customer_id, gender;

[my_table]:
SELECT "id as customer_id","gender"
FROM "public"."table";&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;but I get a load-error since "customer_id" is not found.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(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)&lt;/P&gt;</description>
    <pubDate>Tue, 04 Jan 2022 10:31:07 GMT</pubDate>
    <dc:creator>jakobjensen</dc:creator>
    <dc:date>2022-01-04T10:31:07Z</dc:date>
    <item>
      <title>Rename field in SQL query and not in LOAD</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Rename-field-in-SQL-query-and-not-in-LOAD/m-p/1876952#M10040</link>
      <description>&lt;P&gt;Say I have the following database table&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;id |   gender 

--+------------

1       M

2      F&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to change the name in the SQL-query and *not* in the LOAD query i.e&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;LIB CONNECT TO 'database';

LOAD customer_id, gender;

[my_table]:
SELECT "id as customer_id","gender"
FROM "public"."table";&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;but I get a load-error since "customer_id" is not found.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(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)&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jan 2022 10:31:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Rename-field-in-SQL-query-and-not-in-LOAD/m-p/1876952#M10040</guid>
      <dc:creator>jakobjensen</dc:creator>
      <dc:date>2022-01-04T10:31:07Z</dc:date>
    </item>
    <item>
      <title>Re: Rename field in SQL query and not in LOAD</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Rename-field-in-SQL-query-and-not-in-LOAD/m-p/1876953#M10041</link>
      <description>&lt;P&gt;Try correcting the quotes like:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;LOAD customer_id, gender;

[my_table]:
SELECT "id" as "customer_id","gender"
FROM "public"."table";&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 04 Jan 2022 10:35:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Rename-field-in-SQL-query-and-not-in-LOAD/m-p/1876953#M10041</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2022-01-04T10:35:53Z</dc:date>
    </item>
  </channel>
</rss>

