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 |
|
sharankruthi
Starting Member
22 Posts |
Posted - 2009-07-24 : 01:45:02
|
| How to insert decimal values?EXEC inserttax'1','07/17/2009','Tax1','1','1','1','100',CONVERT(decimal(10.000)),'10'CONVERT(decimal(10.000)), - > this column is decimal. Its giving me error |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2009-07-24 : 01:47:37
|
EXEC inserttax'1','07/17/2009','Tax1','1','1','1','100',CONVERT(decimal, 10.000),'10' N 56°04'39.26"E 12°55'05.63" |
 |
|
|
sharankruthi
Starting Member
22 Posts |
Posted - 2009-07-24 : 02:03:46
|
| Msg 156, Level 15, State 1, Line 9Incorrect syntax near the keyword 'CONVERT'.Am getting this error |
 |
|
|
rajdaksha
Aged Yak Warrior
595 Posts |
Posted - 2009-07-24 : 02:51:56
|
| Hiyour query convertion is not nessasary.. you have already using the decimal value right 10.000ORyou can use the variable to assign the values then reuse the varibale on the procedure call-------------------------R.. |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-07-24 : 04:18:08
|
| Yes. You dont need explicit convertion as it is already a decimalAlso, you cant use functions over the variable/value when you directly use them inside EXECMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|
|
|