Skip to Content
Former Member
Mar 03, 2011 at 07:09 PM

Query for dispatch details for BP SO


Hi experts,

I am new to the forum and would appreciate your help. I am trying to make a report about the pending and dispatched material for BP. The qurey is -

SELECT T0.[DocNum], T0.[CardName], T0.[NumAtCard], T0.[TaxDate], T0.[DocDueDate], T1.[ItemCode], T1.[Quantity], T1.[OpenQty], T2.[DocNum], T2.[DocDate], T2.[ShipToCode], T2.[TrackNo] FROM ORDR T0 INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry, OINV T2 INNER JOIN INV1 T3 ON T2.DocEntry = T3.DocEntry, OPOR T4 INNER JOIN POR1 T5 ON T4.DocEntry = T5.DocEntry, ODLN T6 INNER JOIN DLN1 T7 ON T6.DocEntry = T7.DocEntry WHERE T0.[CardName] = [%0] AND T3.[BaseRef] = T6.[DocNum] AND T7.[BaseRef] = T0.[DocNum] AND T1.[ItemCode] = T3.[ItemCode]

But i get an error message -

1). [Microsoft][SQL Native Client][SQL Server]The conversion of the nvarchar value '3700081929' overflowed an int column. Maximum integer value exceeded. 'User-Defined Values' (CSHS)

Pl help. Thanking you in advance.