on 2020 Jul 30 9:23 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
8 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.