Skip to Content
J S

Invalid ColumnName frDate

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    Posted on Jul 30, 2020 at 02:34 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.