Skip to Content
0
Former Member
Mar 01, 2011 at 12:02 PM

Whole Numbers in SQL Queiries

123 Views

I have produced the query below so that it will alert our purchaser when he needs to chase up undelivered goods inwards. I want the qty only to display as a whole number rather than having 3 decimal places after it, i am sure there is way of doing this just not sure how to

SELECT T0.[DocNum] AS Doc, T0.[CardName]AS Supplier, T1.[LineNum] AS Row, T1.[ItemCode] AS Code, T1.[Dscription] As Desciption, T1.[Quantity] AS Qty, T1.[ShipDate] AS [Del. Date], T1.[OpenQty] AS [Qty to Deliver] FROM OPOR T0 INNER JOIN POR1 T1 ON T0.DocEntry = T1.DocEntry WHERE T1.[ShipDate] > GETDATE() -7 AND T1.[ShipDate] < GETDATE() +7 AND T0.[DocStatus] = 'O' AND T1.[OpenQty] > 0 AND T1.[LineStatus] = 'o'