cancel
Showing results for 
Search instead for 
Did you mean: 

Invalid ColumnName frDate

former_member645084
Participant
0 Kudos
76

Hi

I have below code

Declare @frDate as Datetime
Declare @toDate as Datetime


set @frDate = (select min(ta.TaxDate) from OWTR ta where ta.TaxDate >= '[%0]')
set @frDate = (select min(ta.TaxDate) from OWTR ta where ta.TaxDate <= '[%1]')

Select T0.DocNum,T0.TaxDate,T1.ItemCode
from Owtr T0 inner join Wtr1 T1 on T0.DocEntry = T1.Docentry
Where T0.TaxDate between @frDate and @toDate

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

kothandaraman_nagarajan
Active Contributor
0 Kudos

Hi,

Try this query,

Declare @frDate as Datetime

Declare @toDate as Datetime

set @frDate = (select max(ta.TaxDate) from OWTR ta where ta.TaxDate >= '[%0]')

set @toDate = (select min(tb.TaxDate) from OWTR tb where tb.TaxDate <= '[%1]')

Select T0.DocNum,T0.TaxDate,T1.ItemCode

from Owtr T0 inner join Wtr1 T1 on T0.DocEntry = T1.Docentry

Where T0.TaxDate between @frDate and @toDate

Regards,

Nagarajan

Answers (0)