Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How do I pull in all rows except for ones with a null value?

Maybe this is best suited for a SQL discussion but here goes.

I want to pull in all rows except for the ones where DOINVSTATUSID is not equal to NULL.

I tried WHERE DOINVSTATUSID <> ';'. ITMSNumber NOT LIKE '_%'; (because I don't want the ones with a character at the front), DOINVSTATUSID IS NOT NULL;

None of them work.

1 Solution

Accepted Solutions
adamdavi3s
Master
Master

WHERE (DOINVSTATUSID IS NOT NULL OR DOINVSTATUSID NOT LIKE  ';%')


Should work fine?


However you might find it isn't actually null but blank?


In which Case


WHERE (LEN(DOINVSTATUSID) >0 OR DOINVSTATUSID NOT LIKE  ';%')

View solution in original post

14 Replies
adamdavi3s
Master
Master

WHERE (DOINVSTATUSID IS NOT NULL OR DOINVSTATUSID NOT LIKE  ';%')


Should work fine?


However you might find it isn't actually null but blank?


In which Case


WHERE (LEN(DOINVSTATUSID) >0 OR DOINVSTATUSID NOT LIKE  ';%')

Not applicable
Author

Thank you Adam!

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Try below script,

I havent tested, but I guess this should work.

Sql Select * from Xyz where not isnull XYz;

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
adamdavi3s
Master
Master

No worries which was the correct one in the end?? purely for my own interest!

Not applicable
Author

WHERE (DOINVSTATUSID IS NOT NULL OR DOINVSTATUSID NOT LIKE  ';%')

Not applicable
Author

Adam it turns out that that wasn't right...

adamdavi3s
Master
Master

Not a problem, we are here to help!

Can you look at the data in SQL Management studio and if so what does it look like?

Not applicable
Author

DOINVSTATUSID.PNG

Anil_Babu_Samineni

Try like this

Load

     *

     FROM

     <Table-Name>

          Where

                    Len(DOINVSTATUSID)>0

                              Or

                    not WildMatch(DOINVSTATUSID,'*;**');

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