I know this is very simple...but the syntax is really screwing me up...Basically what I want to do is have this query check for orders that have been open two hours and more and does not have a quoted price...a small snippet of my query with out all my inner joins is:
My syntax problem is at the datediff - this is my error
Incorrect syntax near '>' - If I dont use > I get Incorrect syntax near ')'
Help will be great.
Code:
select customer.customer_id_string, ordr.order_no, ordr.order_date.... from cus... join on ...cus = ... where (customer.customer_id_string like '12345' and datediff(hour, ordr.orderdate, getdate()) > '2')
Incorrect syntax near '>' - If I dont use > I get Incorrect syntax near ')'
Help will be great.
Comment