Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Load and Select data from database problem in Qlik Sense

When I use the following query to load data from database to Qlik sense, Qlik Sense would complain 'no myDate field found'. Could you please give any suggestion? Thanks!

I have connected to the database, and the connection is correct. I can not just use 'Load *, because I would like to some Qlik Sense function during loading data, such as 'GeoMakePoint ', 'Date()'.


Load

     myDate ,

    date_String ,

     myVlaue ,

     latitude ,

     longititude ,

     GeoMakePoint ( latitude , longititude ) as myLocation

Select

     TO_DATE(from_unixtime(UNIX_TIMESTAMP(date_String , 'M/dd/yyyy'))) as myDate ,

     date_String ,

     myVlaue ,

     latitude ,

     longititude

From myTable

1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Depending on the database, the myDate in the SQL may be returned upper case. What database is it?

Try a couple things.

1) Refer to it as MYDATE (upper case) in the LOAD statement.

2) Quote in the SQL:

Select

     TO_DATE(from_unixtime(UNIX_TIMESTAMP(date_String , 'M/dd/yyyy'))) as "myDate"

-Rob

http://masterssummit.com

http://qlikviewcookbook.com

View solution in original post

6 Replies
marco_almeida
Creator II
Creator II

hey...

Missing ';' after myLocation.

Grupo Telegram Qlik Brasil: https://t.me/joinchat/AeRmnUmcxQ02L00g3x-HtQ
Anonymous
Not applicable
Author

Hi Marco, thanks for your help!

Missing ' ; '  between Load part and Select part is a type error when I copy script from Qlik sense to Qlik community.

When I run the query with ' ; ' in the above query, Qlik sense would complain: Field not found - <myDate>

Any suggestion is appreciated!

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Depending on the database, the myDate in the SQL may be returned upper case. What database is it?

Try a couple things.

1) Refer to it as MYDATE (upper case) in the LOAD statement.

2) Quote in the SQL:

Select

     TO_DATE(from_unixtime(UNIX_TIMESTAMP(date_String , 'M/dd/yyyy'))) as "myDate"

-Rob

http://masterssummit.com

http://qlikviewcookbook.com

marco_almeida
Creator II
Creator II

Is true. In Oracle DB exists only upper fields x.x

Grupo Telegram Qlik Brasil: https://t.me/joinchat/AeRmnUmcxQ02L00g3x-HtQ
Anonymous
Not applicable
Author

Rob , thanks so much for your help!
I use Oracle.
1) Refer to it as MYDATE in the LOAD part, works.
2):Add " " to myDate at Selection part, also works.

Anonymous
Not applicable
Author

when I load data from Apache Hive table, all the field name is lower case. Be careful about the upper/lower case.