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 |
trackjunkie
Starting Member
31 Posts |
Posted - 2010-10-13 : 16:40:59
|
I have the following simple update proceedure:ALTER Procedure [dbo].[Flex_SetQ/ATriggers] ( @RMANum nvarchar(30))AsUpdate item SET charfld2 = 'Y', charfld3 = @RMANum, decifld1 = 3WHERE item.item = (select top 1 rmaitem.item from rmaitem where ltrim(rmaitem.rma_num) = @RMANum)This works as long as there is only one match on rmaitem, but violates the "=" clause if there are multiple matches. That is why I added the "top 1" for now. How can I get this to update multiple results from rmaitem? |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|