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: 
Anonymous
Not applicable

Select different Date fields


Hi Folks,

today I work with one Date field.
As from a selected range, the meaning of the Date field changed to another field named Date2.

I have to select the Data as follows:

From 100000 to 344999 the field Date contains the correct Date
From 350000 to 999999 the field Date2 contains the correct Date

The data should run together and named Date
to have clear structured Qlik - Data at the end of the day.

The data are collected from a *.txt file

Any idea? Thank you in advance!

Wolfgang

1 Reply
syukyo_zhu
Creator III
Creator III

hi, i am not sure i understand exactely  your question.

but you can try it.

temp0:

load * 1 as flag from matable where mykey>1000000 and mykey<3449999;

load * 2 as flag from matable where mykey>3500000 and mykey<9999999;

mytablefinaly:

load *, if(flag=1, date, date2) as datecorret resident temp0;

drop table temp0;

drop fields date, date2 from mytablefinaly;