| Author |
Topic |
|
eem_2055
Yak Posting Veteran
69 Posts |
Posted - 2009-02-19 : 22:41:25
|
| Hi,Can you help me? I want to convert 20000 which is a varchar datatype to 200.00 in decimal what query can I use?TNx. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-02-19 : 22:48:33
|
| [code]DECLARE @Var varchar(20)SET @Var=20000SELECT @Var*1*0.01[/code] |
 |
|
|
eem_2055
Yak Posting Veteran
69 Posts |
Posted - 2009-02-19 : 22:54:55
|
| I have a table sample and a field balance:sample:balance2000010000and I want to convert it tosample:balance200.00100.00what should I do? |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-02-19 : 23:00:20
|
| update tableset balance=balance*1*0.01 |
 |
|
|
bklr
Master Smack Fu Yak Hacker
1693 Posts |
Posted - 2009-02-20 : 00:19:24
|
quote: Originally posted by eem_2055 Hi,Can you help me? I want to convert 20000 which is a varchar datatype to 200.00 in decimal what query can I use?TNx.
hi eem,why r u storing the values in varchar datatype use decimal or numeric datatype to store the values |
 |
|
|
eem_2055
Yak Posting Veteran
69 Posts |
Posted - 2009-02-20 : 01:41:14
|
| tnx a lot! I made it!! |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-02-20 : 02:58:06
|
| welcome |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-02-20 : 04:53:24
|
quote: Originally posted by visakh16 welcome
What is your reply to bklr's question?MadhivananFailing to plan is Planning to fail |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-02-20 : 09:07:45
|
quote: Originally posted by madhivanan
quote: Originally posted by visakh16 welcome
What is your reply to bklr's question?MadhivananFailing to plan is Planning to fail
which question? |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-02-20 : 09:11:47
|
quote: Originally posted by visakh16
quote: Originally posted by madhivanan
quote: Originally posted by visakh16 welcome
What is your reply to bklr's question?MadhivananFailing to plan is Planning to fail
which question?
My question was to OP. Mistakenly I quoted your reply MadhivananFailing to plan is Planning to fail |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-02-20 : 09:13:56
|
oh...i see |
 |
|
|
|