I'm assuming that this will be similar to MySQL, but I'm a big slacker with creating any type of query at the command line. I'm wondering how to do the following:
SELECT SalesOrderNo,OrderDate,OrderType,OrderStatus,[lots of columns here] FROM SO_SalesOrderHeader
With these limiters: ARDivisionNo IS 90 UDF_IN_SHIPPING IS TRUE (or 1 or whatever my boolean happens to be) OrderType IS NOT M,R,C (Master, Recurring, Complete)
is it the following?
SELECT SalesOrderNo,OrderDate,OrderType,OrderStatus,[lots of columns here]
FROM SO_SalesOrderHeader
WHERE ARDivisionNo IN 90
AND (UDF_IN_SHIPPING = 'TRUE')
AND (OrderType NOT IN (M,R,C))
Any thoughts?
I'm pretty sure that UDF_IN_SHIPPING IS TRUE is correct, and ARDivisionNo = 90 is what you're after. The rest looks ok.
I'm assuming MS SQL Server?
Yeah, it's actually for a shipping software that's connecting to our MRP/fulfillment software, so it's a Windows Server 2003 ODBC connection
//edit
So I'm looking for this as my final statement?
SELECT SalesOrderNo,OrderDate,OrderType,OrderStatus,[lots of columns here]
FROM SO_SalesOrderHeader
WHERE ARDivisionNo = 90
AND (UDF_IN_SHIPPING IS TRUE)
AND (OrderType NOT IN (M,R,C))
That seems right, it's been at least six years since I've done anything with MSSQL.
seems right to me?
SQL is pretty logical. And your SQL query makes sense. So chances are it works.
nice. I'll test it out on Monday. I hope I break something real good!