Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
nuntius007
Contributor
Contributor

Link Oracle and Excel

I have the following queries and I cannot link them. Can someone show me how to do it?

Regards.

UploadStats:

SQL Select

(to_number(to_char(UPLOAD_DATE, 'DD')) || to_number(to_char(UPLOAD_DATE, 'MM')) || to_number(to_char(UPLOAD_DATE, 'YYYY'))) as Keyfield,

INSTANCE_ID,

ENVIRONNEMENT

from My.OracleTable

Climat:

LOAD

    ([Day] & [Month] & [Year]) as Keyfield,

     [Temp (°C)], [Temp Indicator]

FROM

(biff, embedded labels, table is [fre-hourly$]);

5 Replies
Gysbert_Wassenaar

That's probably because the load from oracle will create a field called KEYFIELD instead of Keyfield. Try adding double quotes around the alias:

UploadStats:

SQL Select

(to_number(to_char(UPLOAD_DATE, 'DD')) || to_number(to_char(UPLOAD_DATE, 'MM')) || to_number(to_char(UPLOAD_DATE, 'YYYY'))) as "Keyfield",

INSTANCE_ID,

ENVIRONNEMENT

from My.OracleTable


talk is cheap, supply exceeds demand
sasikanth
Master
Master

Also try to Store ORACLE table into a QVD and then load this QVD into your application.

jagan
Luminary Alumni
Luminary Alumni

Hi,

Oracle select statement will create the columns in Upper case, to bypass this you need to enclose column in double quotes or use preceding load.

UploadStats:

SQL Select

(to_number(to_char(UPLOAD_DATE, 'DD')) || to_number(to_char(UPLOAD_DATE, 'MM')) || to_number(to_char(UPLOAD_DATE, 'YYYY'))) as "Keyfield",

INSTANCE_ID,

ENVIRONNEMENT

from My.OracleTable

Climat:

LOAD

    ([Day] & [Month] & [Year]) as Keyfield,

     [Temp (°C)], [Temp Indicator]

FROM

(biff, embedded labels, table is [fre-hourly$]);

OR

UploadStats:

LOAD

KEYFIELD AS KeyField,

INSTANCE_ID,

ENVIRONNEMENT

SQL Select

(to_number(to_char(UPLOAD_DATE, 'DD')) || to_number(to_char(UPLOAD_DATE, 'MM')) || to_number(to_char(UPLOAD_DATE, 'YYYY'))) as Keyfield,

INSTANCE_ID,

ENVIRONNEMENT

from My.OracleTable

Climat:

LOAD

    ([Day] & [Month] & [Year]) as Keyfield,

     [Temp (°C)], [Temp Indicator]

FROM

(biff, embedded labels, table is [fre-hourly$]);

Hope this helps you.

Regards,

Jagan.

nuntius007
Contributor
Contributor
Author

Double quotes did work!

Thank you everyone.

Regard!

jagan
Luminary Alumni
Luminary Alumni

Hi,

Instead of giving Assumed Answered you would give Correct and Helpful answers to the posts which helps you.  It encourages others to give answers and also easier to find answers for others.

Regards,

Jagan.