Create PROCEDURE [dbo].[Sp_BannerOpeartions]
@BannerOperationName varchar(100),
@BannerId int,
@BannerImage varchar(250),
@BannerOrderNumber int
AS
BEGIN
if(@BannerOperationName='Select')
begin
Select * from dbo.Tbl_Banner order by BannerOrderNumber
end
if(@BannerOperationName='Insert')
begin
Insert into dbo.Tbl_Banner values (@BannerImage,@BannerOrderNumber)
end
error msg ;;
Msg 213, Level 16, State 1, Procedure Sp_BannerOpeartions, Line 21
Column name or number of supplied values does not match table definition.
4 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.

Ravi PatelPosted Feb 17, 2016, 5:59 AM
Amit Kumar SinghPosted Feb 17, 2016, 4:05 AM
Amit Kumar SinghPosted Feb 17, 2016, 4:04 AM
(
@BannerOperationName varchar(100),
@BannerId int,
@BannerImage varchar(250),
@BannerOrderNumber int
)
AS
BEGIN
if(@BannerOperationName='Select')
begin
Select * from dbo.Tbl_Banner order by BannerOrderNumber
end
if(@BannerOperationName='Insert')
begin
Insert into dbo.Tbl_Banner(table-column)values (@BannerImage,@BannerOrderNumber)
end
END
Shubham KumarPosted Feb 17, 2016, 3:45 AM