Luis Cazares (11/9/2012)
Sean Lange (11/9/2012)
Luis Cazares (11/9/2012)
I'm a little more considerate than Sean and will tell you where to start. All these articles are at your disposal just by pressing F1 in SSMS.Stored Procedures: http://msdn.microsoft.com/en-us/library/ms190782(v=sql.105).aspx
"New" way of doing what is expected:
MERGE: http://msdn.microsoft.com/en-us/library/bb510625(v=sql.100).aspx
EDIT: You don't need a trigger, but in your script you have a way to check if the row "exists"
If I came across as inconsiderate I apologize. Certainly not my intention.
Never meant to say you were inconsiderate, but it takes a certain amount of time, and I just happen to have spare time (at least for the moment)
+1 🙂
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/