sir plus
asked on
SQL/Query won't return records with Blanks when I want to retain them
This query
SELECT STK_MASTER.STOCK_CODE, STK_MASTER.STOCK_CATEGORY, STK_MASTER.STOCK_DESCRIPTI ON_1, STK_MASTER.STOCK_DESCRIPTI ON_2FROM OURDB.dbo.STK_MASTER STK_MASTER
WHERE (STK_MASTER.STOCK_DESCRIPT ION_2 Not Like '%DO NOT USE%')
Returns only records which do not contain the text DO NOT USE in the field STOCK_DESCRIPTION_2, unfortunately it also does not return fields where STOCK_DESCRIPTION_2 is blank. I need it to return the blank records as well
SQL-Issue.JPG
SELECT STK_MASTER.STOCK_CODE, STK_MASTER.STOCK_CATEGORY,
WHERE (STK_MASTER.STOCK_DESCRIPT
Returns only records which do not contain the text DO NOT USE in the field STOCK_DESCRIPTION_2, unfortunately it also does not return fields where STOCK_DESCRIPTION_2 is blank. I need it to return the blank records as well
SQL-Issue.JPG
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
it's fine by me :)
not sure I would claim my clear as mud explanation is fantastic - but thank you.
just note that NULL is a special case generally needing explicit conditions through:
IS NULL / IS NOT NULL
or
ISNULL()
Cheers, Paul.
not sure I would claim my clear as mud explanation is fantastic - but thank you.
just note that NULL is a special case generally needing explicit conditions through:
IS NULL / IS NOT NULL
or
ISNULL()
Cheers, Paul.
Thanks, When reading PortletPaul's response, I did hope that you'd reward him too.
Kelvin
Kelvin
ASKER
Hope that's ok with everyone..
Many thanks for working out what out IT people couldn't......