Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys ,
I want to load in a data set. there is a date field, some rows of data have a empty/null value. so i do not want to load in those particular rows with the date field data is empty or now??
can i write.
load
ID ,
planned_date
where planned_date <> null() ;
will this where clause work as well???
rgds
Jim
It will not return any rows if you use that. Cos Len(Trim(EmptyData)) is always 0 so if you use < 0 the condition fails and it will not return any rows. If you want empty rows to be pulled use = 0. If you dont want to pull empty rows use Len(Trim(plannedDate)) > 0. Hope you got it.
Yes, you can try that or like:
load
ID ,
planned_date
where Len(Trim(planned_date)) > 0 ;
Thanks Vish,
mind to tell me whats the different???? in short ?
Rgds
Jim
Dear Vish,
what if i want to load in data rows that has EMPTY date field data?
is it gonna be Len(Trim(planned_date)) < 0 ?
Rgds
Jim
Sometimes data is not always null. So if there are any spaces or empty values Trim() will remove those extra spaces and Len() will count if there is any data. If there is a data then Len() will give you the size of that field value. So used Len() > 0 will return all the valid data.
It will not return any rows if you use that. Cos Len(Trim(EmptyData)) is always 0 so if you use < 0 the condition fails and it will not return any rows. If you want empty rows to be pulled use = 0. If you dont want to pull empty rows use Len(Trim(plannedDate)) > 0. Hope you got it.