Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query help.

Status
Not open for further replies.

sd110404

Programmer
Nov 3, 2004
63
US
Hi,

SELECT Right(DatePart('yyyy',Date()),2), DatePart('m',Date()), *
FROM JobOrder
WHERE (((JobOrder.JobOrderDate)>(Date()-DatePart('d',Date()))) AND ((JobOrder.QuoteID) Is Not Null) AND ((JobOrder.OrderID) Is Not Null));

The above query is returning the following recordset.

Expr1 Expr2 SNo Quote# Order# ......
05 1 A1 Q0001 1
05 1 A2 Q0002 2
05 1 A3 Q0002 2a
05 1 A4 Q0002 2b

I want the query to return the following o/p

Expr1 Expr2 SNo Quote# Order# ......
05 1 A1 Q0001 1
05 1 A2 Q0002 2
05 1 A5 Q0003 3

How can i modify the above query.
Thanks.
 
What about this ?
AND IsNumeric(OrderID)
Or this:
AND IsNumeric(Trim(OrderID))

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Wow , thanks a lot PHV, that really helped a lot.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top