Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
userid128223
Creator
Creator

Qlikview Code help understand

New to QlikView I always get errors while coding and it is due to field being not recognized. Can someone explain me how qlikviwe works.

Load

date as tempdate,

date(date#(left(tempdate,10),'MM/DD/YYYY')) as newdate

from ......

the above will give me error saying tempdate not recognized, becuase it is within the same Load function. Why does that happen, how can i manipulate a field and make it available right after instead of creating new resident load.

Thanks

4 Replies
Not applicable

The "tempdate" field will not exist in the data model until the load statement is complete.

You can try this:

Load date(date#(left(tempdate,10),'MM/DD/YYYY')) as newdate;

Load

date as tempdate,

from ......;

userid128223
Creator
Creator
Author

i tried that but then it ignores the load statement after and does not load any date from full load statement.

My goal is to load a table with correct date field.

Not applicable

Load

date as tempdate,

date(date#(left(tempdate,10),'MM/DD/YYYY')) as newdate

from ......

change to

Load

date as tempdate,

date(date#(left([date],10),'MM/DD/YYYY')) as newdate

from ......

I would use the square brackets to identify date as a field and not a function. Like Enrique said tempdate does not exist until the load statement is complete.

Not applicable

Sorry, the load statement should be:

Load date(date#(left(tempdate,10),'MM/DD/YYYY')) as newdate;

SQL Select

date as tempdate     //without ","

from Table;