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.
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 opleft join PCH1 p1 on p1.DocEntry = op.DocNumleft join OPDN od on od.DocNum = p1.BaseRefwhere convert(varchar(12),op.DocDate,103) >= '{?FromDate}' and convert(varchar(12),op.DocDate,103) <= '{?ToDate}'Harish Patil |
|
|
|
|
|
|