INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Syntax Error

Syntax Error

(OP)
Can anyone sport a syntax error with this sql command - driving me mad:

CODE

SELECT SUM(DUEQTY_11) as issQty FROM ("Order Master" INNER JOIN "Requirement Detail" ON "Order Master".ORDER_10 = "Requirement Detail".ORDER_11) INNER JOIN "Job Progess" ON "Order Master".ORDER_10 = "Job Progress".ORDNUM_14 WHERE "Order Master".TYPE_10 = 'MF' AND "Order Master".STATUS_10 = '3' AND "Requirement Detail".PRTNUM_11 = '18101961' AND "Job Progress".OPRSEQ_14 = '0001' AND "Job Progress".MOVDTE_14 <> NULL

Error message is:

Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Pervasive][ODBC Client Interface][Pervasive][ODBC Engine Interface]Syntax Error: DNUM_14 WHERE "Order Master".TYPE_10 = 'MF' AND "Order Master".STATUS_10 = '3' AND "Requirement Detail".PRTNUM_11 = '18101961' AND "Job Progress".OPRSEQ_14 = '0001' AND "Job Progress".MOVDTE_14 <> NUL<< ???


"Job Progress".MOVDTE_14 is a date field and I want to get all records where there is no date in that field.

Mighty

RE: Syntax Error

I believe that the correct syntax when dealing with null is "is null" or "is not null" so you're query would be:

CODE

SELECT SUM(DUEQTY_11) as issQty FROM ("Order Master" INNER JOIN "Requirement Detail" ON "Order Master".ORDER_10 = "Requirement Detail".ORDER_11) INNER JOIN "Job Progess" ON "Order Master".ORDER_10 = "Job Progress".ORDNUM_14 WHERE "Order Master".TYPE_10 = 'MF' AND "Order Master".STATUS_10 = '3' AND "Requirement Detail".PRTNUM_11 = '18101961' AND "Job Progress".OPRSEQ_14 = '0001' AND "Job Progress".MOVDTE_14 IS NOT NULL

Mirtheil
Certified Pervasive Developer
Certified Pervasive Technician
http://www.mirtheil.com

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close