View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Kim Carlsen Kim Carlsen is offline
external usenet poster
 
Posts: 8
Default how to cast in a select

Hi
Using C# i try to select from an excel file, to insert it into a
datagridview and it works perfectly. But I would like have some of the
columns to have 2 or 3 decimals.
The data in the excel file is e.g 88,7 but I would like it in the
datagridview to show as 88,700.
I tried to do a cdec as in the following select:
SELECT [Navn] AS [Produkt], cdec([13]) AS [vand] FROM [FDB7.01$]

But that returns the error:
Wrong number of arguments used with function in query expression 'cdec([13]'.

What am I doing wrong? or is there a better way?

Thanks
Kim