I am new to Sybase so please bare with me.
I have created a table and created a store procedure to insert the new record into the newly created table. I am doing a direct Execute statement like this: EXECUTE dbo.usp_change "NP1016", 220804, "MOM", "May 2 2005 8:13PM", "NP201", "May 2 2005 8:13PM", "NP201", "Change.", "Y".
This is my stored proc: CREATE PROCEDURE dbo.usp_change
@pc_emp_id VARCHAR(15),
@pn_dep_id INT,
@pc_relation CHAR(5),
@pc_change_pr_flag CHAR(1),
@pc_reason_text VARCHAR(255)
AS
UPDATE dbo.tbl_change
SET emp_id = @pc_emp_id,
dep_id = @pn_dep_id,
relation = @pc_relation,
flag_for_change = @pc_change_pr_flag,
comment_text = @pc_reason_text,
last_update_date = @ldt_today,
last_update_id = @lc_user_id,
authorized_user_date = @ldt_today,
authorized_user_id = "ACTIONSApp"
FROM dbo.tbl_change
When I insert the one record, I get 1 row affected. But when I do a select * from dbo.tbl_change, I do not see the record that I just inserted. Any clue as to what I have done wrong?
Please Help!!!!
I have created a table and created a store procedure to insert the new record into the newly created table. I am doing a direct Execute statement like this: EXECUTE dbo.usp_change "NP1016", 220804, "MOM", "May 2 2005 8:13PM", "NP201", "May 2 2005 8:13PM", "NP201", "Change.", "Y".
This is my stored proc: CREATE PROCEDURE dbo.usp_change
@pc_emp_id VARCHAR(15),
@pn_dep_id INT,
@pc_relation CHAR(5),
@pc_change_pr_flag CHAR(1),
@pc_reason_text VARCHAR(255)
AS
UPDATE dbo.tbl_change
SET emp_id = @pc_emp_id,
dep_id = @pn_dep_id,
relation = @pc_relation,
flag_for_change = @pc_change_pr_flag,
comment_text = @pc_reason_text,
last_update_date = @ldt_today,
last_update_id = @lc_user_id,
authorized_user_date = @ldt_today,
authorized_user_id = "ACTIONSApp"
FROM dbo.tbl_change
When I insert the one record, I get 1 row affected. But when I do a select * from dbo.tbl_change, I do not see the record that I just inserted. Any clue as to what I have done wrong?
Please Help!!!!