one question about sqlce

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hi bros,
anybody can tell me whether sqlce database supply the following command:

string sql="select datepart(month,o.createdate) as month,
sum(o.totalprices) as 'sum',count(*) from GS_Orders o,GS_Orderstatus os where
o.orderstatusID=os.orderstatusID and os.statusname='Completed' and
datepart(year,o.createdate)='" + current.Year.ToString() + "' group by
datepart(month,o.createdate)"

i can pass compile, but faile in runing, exception message shows "therer was
an error parsing the query "

by the way, the above query can run succefully in sql 2000.

thx anyway!
 
Try changing
sum(o.totalprices) as 'sum',
to
sum(o.totalprices) as \"sum\",

For further diagnostics make sure to look inside the exception - into the
Errors collection
 
Back
Top