Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
kingkong
Starting Member
16 Posts |
Posted - 2004-10-26 : 23:16:02
|
| If I have the following data need to save into the table. What data type I should use? Now I am using the varchar. But I need usecast(FBMIID as decimal) before I output for ordering. Do I correct?121.22001.232 |
|
|
jen
Master Smack Fu Yak Hacker
4110 Posts |
Posted - 2004-10-26 : 23:28:19
|
| i'm not sure if i understand your question:case 1:i suggest you use decimal, since the data is decimal in nature? no need to use additional function for formatting. unless your table schema have been finalized already by your DBA and is now in productions?case 2: if data type is varchar, and you need to output decimal format, then you can use cast or convert. check BOL for desired format.--------------------keeping it simple... |
 |
|
|
kingkong
Starting Member
16 Posts |
Posted - 2004-10-26 : 23:51:52
|
Thanksquote: Originally posted by jen i'm not sure if i understand your question:case 1:i suggest you use decimal, since the data is decimal in nature? no need to use additional function for formatting. unless your table schema have been finalized already by your DBA and is now in productions?case 2: if data type is varchar, and you need to output decimal format, then you can use cast or convert. check BOL for desired format.--------------------keeping it simple...
|
 |
|
|
|
|
|