CREATE PROCEDURE insert_selvi
@name varchar(20),@gender varchar(10),@education varchar(20),@comname varchar(20),@designation varchar(20),@location varchar(30),@emailid varchar(30),@mobile bigint,@phone bigint
AS
BEGIN
insert into swathi (name,gender,education,comname,designation,location,emailid,mobile,phone)
SELECT @name,@gender,@education,@comname,@designation,@location,@emailid,@mobile,@phone
END
It throws error
Msg 207, Level 16, State 1, Procedure insert_selvi, Line 7
Invalid column name 'gender'.
Msg 207, Level 16, State 1, Procedure insert_selvi, Line 7
Invalid column name 'education'.
Msg 207, Level 16, State 1, Procedure insert_selvi, Line 7
Invalid column name 'comname'.
Msg 207, Level 16, State 1, Procedure insert_selvi, Line 7
Invalid column name 'designation'.
Msg 207, Level 16, State 1, Procedure insert_selvi, Line 7
Invalid column name 'location'.
Msg 207, Level 16, State 1, Procedure insert_selvi, Line 7
Invalid column name 'emailid'.
Msg 207, Level 16, State 1, Procedure insert_selvi, Line 7
Invalid column name 'mobile'.
Msg 207, Level 16, State 1, Procedure insert_selvi, Line 7
Invalid column name 'phone'.

Akkiraju IvaturiPosted Sep 8, 2012, 1:16 AM
Check if you are pointing to the correct database. It may be possible that you are pointing to wrong database but it has same columns. Check also the table if it has got all the columns.
selvi subramanianPosted Sep 6, 2012, 7:20 AM
Jignesh TrivediPosted Jul 23, 2012, 12:03 AM
I think, there is problem with your table "swathi", check columns in this table.
may be column donot belong to this table.
kindly share you table description with us so we can identify.
thx.