Excel Query [modified]
-
Hi frns,
select CONVERT(varchar ,[regdate],103) Dates,[user],[client facility],sum([payroll score])LC from [sheet1$]
group by [user],[client facility], CONVERT(varchar ,[regdate],103) order by [user]i am programatically retreving data from excel sheet. for retriving data from excel the query i have written is the above but it is giving me error. the error is :Syntax error (missing operator) in query expression 'CONVERT(varchar ,[regdate],103) Dates'. How to use the convert function in excel query regards sunilwise
modified on Monday, December 1, 2008 4:53 AM
-
Hi frns,
select CONVERT(varchar ,[regdate],103) Dates,[user],[client facility],sum([payroll score])LC from [sheet1$]
group by [user],[client facility], CONVERT(varchar ,[regdate],103) order by [user]i am programatically retreving data from excel sheet. for retriving data from excel the query i have written is the above but it is giving me error. the error is :Syntax error (missing operator) in query expression 'CONVERT(varchar ,[regdate],103) Dates'. How to use the convert function in excel query regards sunilwise
modified on Monday, December 1, 2008 4:53 AM
no probs i got the solution i modified my query to string sql = "select format([dateregistered],'MM/dd/yyyy') as Dates,[user],[client facility],sum([payroll score]) as LC from [sheet1$] group by [user],[client facility], format([dateregistered],'MM/dd/yyyy') order by [user]"; its working for me.......... ;) ;)
modified on Monday, December 1, 2008 4:54 AM