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 |
whsbeernuts
Starting Member
11 Posts |
Posted - 2007-09-11 : 13:17:42
|
Hello again, I have a huge question haha. I just simply want to make a number display differently before I insert it into the table. for instance in Access, you can simply say FORMAT(c,format) ex: FORMAT(@CHARMINS, 00000) and it should work that way.How would I accomplish this in SQL server? Right now I have the number 30 displaying as 30.00 in the variable it is set to.... I want it to be shown as 00030.... and any other number that is like 30.00, I want it shown the same way. Like 100.00 would be 00100. Thank you. |
|
X002548
Not Just a Number
15586 Posts |
|
whsbeernuts
Starting Member
11 Posts |
Posted - 2007-09-11 : 13:39:02
|
Yes it is a char that is being stored! When it displays 00030... that's a char. I need to convert the 30.00 from numeric(19,2) to a char(7) and also display it as a char(7) with this format: 00000There is some more information for you. Thanks |
 |
|
X002548
Not Just a Number
15586 Posts |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-09-12 : 02:06:50
|
As usual, if you want to show formatted data at front end, you can use format function thereVB6 exFormat(Rs("Decimal_column"),"0000000")MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|
|