Skip to Content
Former Member
Jun 24, 2014 at 06:17 AM

No data while executing


No data while executing this query .Please Help

Declare @FrmDate as date

Declare @ToDate as date

Declare @series as Varchar(10)

SELECT T2.[CardCode] AS 'Customer/Vendor Code', T2.[CardName] AS 'Customer/Vendor Name',

T2.[DocNum] AS 'Document Number',T3.SeriesName, T1.[SumApplied] AS 'Paid to Invoice',

T2.[DocDate] AS 'Posting Date', T0.[DocNum] AS 'Document Number',

T0.[DocDate] AS 'Posting Date'

FROM [dbo].[OINV] T0 INNER JOIN [dbo].[RCT2] T1 ON T1.[DocEntry] = T0.[DocEntry]

INNER JOIN [dbo].[ORCT] T2 ON T2.[DocNum] = T1.[DocNum]

INNER JOIN [dbo].[NNM1] T3 ON T2.Series = T3.Series

WHERE T2.[DocDate] between @FrmDate and @ToDate and T3.SeriesName = @series