PC Review


Reply
Thread Tools Rate Thread

how to cast in a select

 
 
Kim Carlsen
Guest
Posts: n/a
 
      7th Jul 2009
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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
explicit operator cast --> Specified cast is not valid Peter Microsoft C# .NET 1 24th Aug 2011 09:06 AM
How to cast in an xml based dataset SELECT method? MurdockSE Microsoft Dot NET 11 8th Aug 2006 02:33 AM
checking for valid cast before cast is called? =?Utf-8?B?d2dpbGxpbg==?= Microsoft Dot NET Framework 1 27th Jun 2005 10:29 PM
"Specified cast is not valid" when MyTable.Select is used Al Repasky Microsoft ADO .NET 1 20th Aug 2004 08:20 AM
Web cast Shane Nation Windows XP Internet Explorer 1 30th Apr 2004 09:14 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:35 AM.