0

I keep getting "syntax error in query expression" messages. I have a table full of values where ItemNbr is made up of cells with #s/values and blank(no value) cells. I want the statement to return results where item number will not be a blank.

My statement is:

SELECT DISTINCT TRUSPWK.SKN AS ItemNbr, TRUSPWK.SKNDESC AS ItemDesc1, TRUSPWK.EANUPC AS UPC, TRUSPWK.VNDRNAME AS VendName, TRUSPWK.VNDRNO AS VendStkNbr
FROM TRUSPWK
WHERE TRUSPWK.SKN <>";

The problem I'm noticing is the where statement: TRUSPWK.SKN <>"; Are the <> & " signs being misappropriately used?

3
  • 1
    what database are you using? Commented Mar 14, 2014 at 15:52
  • 1
    Notice, that empty string and null value are quite different things. Commented Mar 14, 2014 at 15:53
  • Are you sure it is blank? Blank must be inserted, instead of NULL. Commented Mar 14, 2014 at 15:58

1 Answer 1

1

Change this

WHERE TRUSPWK.SKN <>";

To

WHERE TRUSPWK.SKN <> '';
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.