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 |
vijay85
Starting Member
1 Post |
Posted - 2009-05-12 : 13:07:54
|
set ANSI_NULLS ONset QUOTED_IDENTIFIER ONGOALTER PROC [dbo].[ISP_UpdateEMP] @emp_name varchar(50), @emp_id bigint, @category varchar(50)ASBEGIN SELECT @emp_name = emp_name FROM emp with(nolock) WHERE category = @category UPDATE emp SET emp_id = @emp_id WHERE emp_name = @emp_name AND category = @categoryENDThanks & Regardsvijay |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2009-05-12 : 13:33:55
|
The example above makes no sense.1. You fetch the last name for a record with certain category2. You are updating the same record (using last name and category) and change the empID? E 12°55'05.63"N 56°04'39.26" |
|
|
|
|
|