在oracle查询时,用"||"进行字符连接。如下例。
CREATE OR REPLACE PROCEDURE Hp_Select_No
(
v_Result out varchar2
)
IS
v_FirstLetter varchar2(50);
v_SystDate varchar2(10);
v_FirstValue varchar2(50);
BEGIN
v_FirstLetter:='r';
--得到日期
select to_char(sysdate,'yyyymmdd') into v_SystDate from dual;
v_FirstValue:=(v_FirstLetter || v_SystDate);
v_Result:=hp_get_no('',v_FirstValue,4);
END;
(
v_Result out varchar2
)
IS
v_FirstLetter varchar2(50);
v_SystDate varchar2(10);
v_FirstValue varchar2(50);
BEGIN
v_FirstLetter:='r';
--得到日期
select to_char(sysdate,'yyyymmdd') into v_SystDate from dual;
v_FirstValue:=(v_FirstLetter || v_SystDate);
v_Result:=hp_get_no('',v_FirstValue,4);
END;