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 |
tooba
Posting Yak Master
224 Posts |
Posted - 2012-10-04 : 19:30:17
|
Hi guys, Help me out. I have very simple query inside S.P, Here it isUpdate MytableSet Pay = (select top 1 'Payer'+' '+e.Payerid from Payer e where e.id = @id) where mytable.id = @id I am getting (Payer) in resule it should be (Payer 12 or Payer so on)Is any one help me why i am not getting value. Data type of fild is varchar(50).Thank You. |
|
sunitabeck
Master Smack Fu Yak Hacker
5155 Posts |
Posted - 2012-10-05 : 07:09:52
|
What do you get when you run the inner query?select top 1 'Payer'+' '+e.Payeridfrom Payer ewhere e.id = @id |
|
|
tooba
Posting Yak Master
224 Posts |
Posted - 2012-10-06 : 00:19:59
|
When i run inner query i am getting value that it suppose to be, but when i am updating some how its change how/when/why no clue.... |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-10-06 : 00:29:24
|
is this any better?Update mSet m.Pay = 'Payer'+' '+e.Payeridfrom Mytable minner join Payer eon m.id = e.idwhere e.id = @id ------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
|
|
|