PROCEDURE "MAINTENANCE"."maintenance.procedures::get_userInfo"(
IN im_USER "MAINTENANCE"."TT_USERLOGIN",
OUT ex_userInfo "MAINTENANCE"."TT_USERINFO" )
LANGUAGE SQLSCRIPT
SQL SECURITY INVOKER
--DEFAULT SCHEMA <default_schema_name>
READS SQL DATA AS
BEGIN
/*****************************
Write your procedure logic
*****************************/
declare lv_EMPLOYEEID nvarchar(10);
declare lv_password nvarchar(1000);
select EMPLOYEEID,PASSWORD
into lv_EMPLOYEEID,lv_password
from :im_USER;
ex_userInfo = select * from "MAINTENANCE"."EMPLOYEES"
where EMPLOYEEID = :lv_EMPLOYEEID and
PASSWORD = :lv_password;
END;
----call procedure----------
drop table #LOGINUSER;
CREATE LOCAL TEMPORARY COLUMN TABLE #LOGINUSER LIKE "MAINTENANCE"."TT_USERLOGIN";
INSERT INTO #LOGINUSER VALUES ('1001','ADMIN');
call "MAINTENANCE"."maintenance.procedures::get_userInfo"( #LOGINUSER,
?)
Hiç yorum yok:
Yorum Gönder