|
expension in procedure
|
|||
---|---|---|---|
#18+
привет создаю процедуру, вроде всё правльно, все названия, строки, синтакс а когда хочу запустить пишет Only one expression can be specified in the select list when the subquery is not introduced with EXISTS. create procedure InsertSales (@Product_ID int, @სახელი nvarchar(100), @აღწერა nvarchar(100), @ფასი int, @რაოდენობა int) AS begin declare @countSales int ; set @countSales = (select * from Sales as Ss where Ss.Product_ID = @Product_ID) if @countSales > 0 update Products Set რაოდენობა_საწყობში=@რაოდენობა where Products_ID =@Product_ID else insert into Products(სახელი, აღწერა, რაოდენობა_საწყობში, ფასი) values(@სახელი, @აღწერა, @რაოდენობა, @ფასი) end; ... |
|||
:
Нравится:
Не нравится:
|
|||
17.07.2012, 02:02 |
|
expension in procedure
|
|||
---|---|---|---|
#18+
привет создаю процедуру, вроде всё правльно, все названия, строки, синтакс а когда хочу запустить пишет Only one expression can be specified in the select list when the subquery is not introduced with EXISTS. create procedure InsertSales (@Product_ID int, @name nvarchar(100), @description nvarchar(100), @price int, @kol-vo int) AS begin declare @countSales int ; set @countSales = (select * from Sales as Ss where Ss.Product_ID = @Product_ID) if @countSales > 0 update Products Set sklad_kol-vo=@kol-vo where Products_ID =@Product_ID else insert into Products(name, description, sklad_kol-vo, price) values(@name, @description, @kol-vo, @sklad_kol-vo) end; ... |
|||
:
Нравится:
Не нравится:
|
|||
17.07.2012, 02:13 |
|
expension in procedure
|
|||
---|---|---|---|
#18+
alex212121 declare @countSales int ; set @countSales = (select * from Sales as Ss where Ss.Product_ID = @Product_ID)что это? ... |
|||
:
Нравится:
Не нравится:
|
|||
17.07.2012, 02:15 |
|
|
start [/forum/topic.php?fid=46&gotonew=1&tid=1711681]: |
0ms |
get settings: |
11ms |
get forum list: |
13ms |
check forum access: |
4ms |
check topic access: |
4ms |
track hit: |
60ms |
get topic data: |
13ms |
get first new msg: |
9ms |
get forum data: |
3ms |
get page messages: |
53ms |
get tp. blocked users: |
2ms |
others: | 256ms |
total: | 428ms |
0 / 0 |