By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,379 Members | 1,377 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,379 IT Pros & Developers. It's quick & easy.

Cast an entire field from VARCHAR to FLOAT

P: 31
How do I cast the entire table field from varchar to float?

Granted, I know the risks involved with doing this, but nonetheless...
May 1 '08 #1
Share this Question
Share on Google+
2 Replies


Delerna
Expert 100+
P: 1,134
Do you mean in the table itself or in a query using the table?

Convert(type,field) is what you use in a query
To change it in the table just design the table and change the type.
I say now more on that as you say you are aware of the danders
May 1 '08 #2

ck9663
Expert 2.5K+
P: 2,878
Here's the complete CAST and CONVERT syntax

-- CK
May 2 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.