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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Urgent please advice

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 use
cast(FBMIID as decimal) before I output for ordering. Do I correct?

1
2
1.2
200
1.23
2

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...
Go to Top of Page

kingkong
Starting Member

16 Posts

Posted - 2004-10-26 : 23:51:52
Thanks
quote:
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...

Go to Top of Page
   

- Advertisement -