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 |
pascal_jimi
Posting Yak Master
167 Posts |
Posted - 2013-09-04 : 03:25:11
|
hi my friendscreate procedure yerde @phone decimal(18,0), @unvan nvarchar(200), @yunvan nvarchar(200), @Sentar smalldatetime, @naryadN smallint, @naryadtar smalldatetime, @sebebi nvarchar(200)asinsert yerdeys(phone , unvan , yunvan ,Sentar , naryadN , naryadtar , sebebi )select@phone,(select top 1 *from phone where phone=@phone),@yunvan,@Sentar,@naryadN, @naryadtar , @sebebi update phoneset telUnvan=@yunvanwhere phone=@phone---- error Only one expression can be specified in the select list when the subquery is not introduced with EXISTS.http://sql-az.tr.gg/ |
|
bandi
Master Smack Fu Yak Hacker
2242 Posts |
Posted - 2013-09-04 : 03:40:11
|
insert yerdeys(phone ,unvan ,yunvan ,Sentar ,naryadN , naryadtar ,sebebi )select@phone,(select top 1 *from phone where phone=@phone), --Here make sure you have only one column)@yunvan,@Sentar,@naryadN,@naryadtar ,@sebebi;update phone set telUnvan=@yunvanwhere phone=@phone;--Chandu |
 |
|
pascal_jimi
Posting Yak Master
167 Posts |
Posted - 2013-09-04 : 03:53:13
|
no bandy (select top 1 *from phone where phone=@phone) -- this is not a problemtO ARTICLEI correctedtopic is closedhttp://sql-az.tr.gg/ |
 |
|
pascal_jimi
Posting Yak Master
167 Posts |
Posted - 2013-09-04 : 03:55:36
|
THANK YOU VERY MUCHhttp://sql-az.tr.gg/ |
 |
|
|
|
|
|
|