Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Other Development Tools
 Error while useing Date in Crystal Report 2008

Author  Topic 

hspatil31
Posting Yak Master

182 Posts

Posted - 2009-05-04 : 08:19:58
Dear All,

I tried following queary in that i used FromDate and ToDate parameter. And for this paramer i sets the Date value type.
But after that it gives the following error,

"Incorrect sytax near 2009"

Can anybody suggest me how to solve this problem.

select op.DocNum,convert(varchar(12),op.DocDate,103),op.CardCode,op.CardName,op.DocTotal,
p1.U_BN,p1.U_LR,p1.U_OPN,p1.U_OPND,p1.Dscription,p1.Quantity,
p1.U_TA,p1.U_Freight,p1.U_OT,p1.U_OR,p1.U_AO,
od.DocNum,od.DocDate
from OPCH op
left join PCH1 p1 on p1.DocEntry = op.DocNum
left join OPDN od on od.DocNum = p1.BaseRef
where convert(varchar(12),op.DocDate,103) >= '{?FromDate}' and convert(varchar(12),op.DocDate,103) <= '{?ToDate}'


Harish Patil
   

- Advertisement -