Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to cast com object (interop) yh Excel Discussion (Misc queries) 0 April 26th 10 09:16 AM
CAST Function Matt S Excel Discussion (Misc queries) 1 February 19th 08 05:16 PM
how to cast a Range value to a Date value? Mark Dvorkin Excel Programming 7 February 1st 06 04:40 AM
Help with MSQuery & CAST function Neil Evans-Mudie Excel Programming 3 October 4th 05 05:20 PM
Need to cast OleObject to CombBbox Liline Excel Programming 1 August 29th 03 03:32 PM


All times are GMT +1. The time now is 12:07 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"