>>In other words:
>>
>>@declare PersonType char(1)
>>update Registration set Approved = 1 where RegistrationID = @RegistrationID
>>
>>Can I get PersonType in the same statement or should I do a separate select statement?
>>
>>Thanks in advance.
>>
>>Ok, I found that I probably can use OUTPUT clause.
>>
>>1. I found that WHERE clause should follow the output (otherwise I was getting errors).
>>
>>2. This statement
>>UPDATE Registration Set Approved = 1
>>WHERE RegistrationID = 1
>>
>>Takes a very long time in the SSMS. The Registration table has 1482 records and 60 columns.
>
>
>declare @PersonType char(1)
>update Registration
>set Approved = 1
> , @PersonType = PersonType
> where RegistrationID = @RegistrationID
>
Thanks, Fabio.
If it's not broken, fix it until it is.
My Blog