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 |
|
d4046949
Starting Member
9 Posts |
Posted - 2008-08-20 : 14:21:00
|
hey guys, i've written this:insert into table1(date) values (@date) where (id=@id); but I'm getting this error:quote: Incorrect syntax near the keyword 'where'.
can't seem to solve it. :( |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2008-08-20 : 14:31:31
|
| You can't use a where clause when using values.Are you just trying to update an existing row? If so, use update instead of insert:UPDATE table1SET date = @dateWHERE id = @idTara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Subscribe to my blog |
 |
|
|
|
|
|