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 |
cognos79
Posting Yak Master
241 Posts |
Posted - 2006-11-15 : 16:03:40
|
I have table with field of datatype "money". how shld i write my sql statementinsert into table1( id, amt,)values( 1, '0')is giving error. should i put the money value in quotes or how shld i write it. |
|
Page47
Master Smack Fu Yak Hacker
2878 Posts |
Posted - 2006-11-15 : 16:13:58
|
Try removing the comma after amtJay White |
 |
|
cognos79
Posting Yak Master
241 Posts |
Posted - 2006-11-15 : 16:28:28
|
jay...thats an typo |
 |
|
Kristen
Test
22859 Posts |
Posted - 2006-11-15 : 16:29:39
|
insert into table1(id,amt)values(1,0.0000) |
 |
|
cognos79
Posting Yak Master
241 Posts |
Posted - 2006-11-15 : 16:33:45
|
thanks kristen |
 |
|
Page47
Master Smack Fu Yak Hacker
2878 Posts |
Posted - 2006-11-15 : 16:34:13
|
Then what is your error?create table #test(id int, amt money)insert into #test(id, amt) values(1, '0')That works no problem. Quotes or not quotes doesn't matter, so long as what is in quotes can be implicitly converted to a money type.Jay White |
 |
|
|
|
|