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

Resident Load where a field is Not Null

Hi all,

This should be a simple statement but i cannot get it to work for me...

I have a table loaded from my Database via ODBC...

I need to clean up a table by only loading rows where the field "ISHRDebName" is not NULL

Here's my script:

ISHRBProductLists:

Load

ISHRBSKU,

ISHRBListMastID,

ISHRBListDescription,

ISHRBDebAcc,

ISHRBDebName

Resident ISHRBProductLists_temp WHERE Len(Trim(ISHRBDebName))>0;


I have tried: (last line)

Resident ISHRBProductLists_temp WHERE Len(ISHRBDebName)>0;


I have also tried:

Resident ISHRBProductLists_temp WHERE NOT ISNull(ISHRBDebName);


I have also tried:

Resident ISHRBProductLists_temp WHERE ISNull(ISHRBDebName)=0;

here's the table I'm loading from:

product lists table.jpg

I need to omit rows where ISHRBDebName is Null ("-").

Alternatively, I could only load Rows where ISHRBDebAcc is a number between 1 and 999999...

can anyone advise on this?

Thanks...

Fabrizio Giorgio


Message was edited by: Fabrizio Giorgio

15 Replies
Anonymous
Not applicable
Author

You are right Luis,

i realise i was a bit ambiguous now...

thank you for your contribution though, it all helps to get to the right answer!!

Apreciate you taking the time!!

Cheers,

Fab

jonathandienst
Partner - Champion III
Partner - Champion III

>>Where ISHRBDebName <> Null();

That wont work properly. Like in SQL, a comparison with NulI() will always be false. Your original condition was correct and the best option.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
luismadriz
Specialist
Specialist

HI,

I don't think you were dropping the table, I think it was being concatenated to the previous one... well I'm not sure of those rules, maybe Jonathan can explain a bit more?

Cheers,

L

Anil_Babu_Samineni

Okay

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anonymous
Not applicable
Author

Hi Luis,

yes it must have been concatenating to the previous (source) table which I was then dropping in the next line...

hence why I wasn't seeing the table at all...

I'm not entirely sure why it was concatenating, but the NoConcatenate statement definitely fixed it...

Thanks again...

Anonymous
Not applicable
Author

Hi Jonathan,

thanks for that input, and noted...

<Where ISHRBDebName <> Null();>   did give me the correct result (i.e. omitted rows where ISHRBDebName was NULL)

However I have reverted back to <WHERE Len(Trim(ISHRBDebName))>0; > based on your recommendation…

Thanks for your help and advice…

Appreciate you taking the time…

Cheers…

Fab