首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > oracle >

PL/SQL,提示编译错误:创建的过程带有编译错误

2014-01-28 
CREATE OR REPLACE function SqGetData(ppid IN VARCHAR2) RETURN VARCHAR2 ISDECLAREvarResult VARCHAR2(1

CREATE OR REPLACE function SqGetData(ppid IN VARCHAR2) RETURN VARCHAR2 IS
  DECLARE
  varResult VARCHAR2(1024);
  varBloodNo VARCHAR2(32);
  varSex VARCHAR2(32);
  varSexN VARCHAR2(32);
  varName VARCHAR2(32);
  varBirthday VARCHAR2(32);
  varPassportid VARCHAR2(32);
  varExamdate VARCHAR2(32);
  varToday VARCHAR2(32);
  varTodayN VARCHAR2(32);
 
  BEGIN
  varToday := TO_CHAR(SYSDATE, 'yyMMdd ');
  varTodayN := TO_CHAR(SYSDATE, 'yyyy-MM-dd ');
  varBloodNo := varToday || ppid;
  select SURNAME,SEX,TO_CHAR(BIRTHDAY, 'yyyy-MM-dd '),PASSPORT_ID,TO_CHAR(EXAM_DATE, 'yyyy-MM-dd ') into varName,

varSex, varBirthday, varPassportid, varExamdate from EXAM_CXDJ as a, EXAM_RECORD as b where a.BLOOD_NO = varBloodNo and

a.EXAM_NO = b.EXAM_NO;

  IF varSex = '0 ' THEN
  varSexN := '男 ';
  ELSE
  varSexN := '女 ';
  END IF;

  varResult := '1, '||varName|| ', '||varSexN || ', '||varBirthday|| ', '|| 'ID0,ID0,ID0,ID0,ID0,ID0,ID0, , ' || varPassportid

|| ', '||varExamdate|| ', '||varTodayN|| ', , ,ID0,ID0, , ';

  return varResult ;
  EXCEPTION         

热点排行