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 |
|
siumui
Yak Posting Veteran
54 Posts |
Posted - 2012-03-20 : 13:49:19
|
| I have an error that says, "Incorrect syntax near 'OUTPUT'." from the codes below:--declare table variableDECLARE @EmpDeleted table (id NUMERIC, f_name varchar(20), l_name varchar(20))DELETE FROM #empWHERE sales IS NULLOUTPUT DELETED.id, DELETED.f_name, DELETED.l_nameINTO @EmpDeletedHelp please.Thank you.siumui |
|
|
DonAtWork
Master Smack Fu Yak Hacker
2167 Posts |
Posted - 2012-03-20 : 13:53:04
|
| [code]DELETE FROM #empOUTPUT DELETED.id, DELETED.f_name, DELETED.l_nameINTO @EmpDeletedWHERE sales IS NULL[/code]How to ask: http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspxFor ultra basic questions, follow these links.http://www.sql-tutorial.net/ http://www.firstsql.com/tutor.htm http://www.w3schools.com/sql/default.asp |
 |
|
|
siumui
Yak Posting Veteran
54 Posts |
Posted - 2012-03-20 : 13:55:09
|
| Thank you!!:0)siumui |
 |
|
|
|
|
|