SQL2000和ASA 存储过程语法有什么不同?解决思路

SQL2000和ASA 存储过程语法有什么不同?
SQL2000和ASA 存储过程语法有什么不同?

------解决方案--------------------
sql anywhere
SQL code
ALTER PROCEDURE "spectwosuite"."zu_proc_g_37"(in p_evaluationdate datetime,in p_vessel numeric(15),in p_name numeric(15)) 
begin
declare l_id1 numeric(15);
declare l_id2 numeric(15);
create table #tmptable(
  employeeid numeric(15) null,
  name varchar(200) null,
  Rank varchar(200) null,
  Birth datetime null,
  Vessel numeric(15) null,
  company varchar(50) null,
  evaluationdate datetime null,
  Port_joined varchar(50) null,
  Date_joined datetime null,
  Port_signed_off varchar(50) null,
  Date_signed_off datetime null,
  Jan_Jun varchar(50) null,
  Jul_Dec varchar(50) null,
  New_joiner varchar(50) null,
  Sign_off varchar(50) null,
  uOthers varchar(50) null,

coor1e varchar(50) null,
  Category01 varchar(50) null,
  Category02 varchar(50) null,
  Category03 varchar(50) null,
  Category04 varchar(50) null,
  Category05 varchar(50) null,
  Category06 varchar(50) null,
 
  Category08 varchar(50) null,
  Category09 varchar(50) null,
  Category10 varchar(50) null,
  Category11 varchar(50) null,
  Category12 varchar(50) null,
Category13 varchar(50) null,

maorce varchar(50) null,
  zCategory01 varchar(50) null,
  zCategory02 varchar(50) null,
  zCategory03 varchar(50) null,
  zCategory04 varchar(50) null,
  zCategory05 varchar(50) null,
  zCategory06 varchar(50) null,

  zCategory08 varchar(50) null,
  zCategory09 varchar(50) null,
  zCategory10 varchar(50) null,
  zCategory11 varchar(50) null,
  zCategory12 varchar(50) null,
zCategory13 varchar(50) null,
 
  Remarks varchar(5000) null,
eng varchar(5000) null,
deck varchar(500) null,
 
  CE varchar(5000) null,
  MASTER varchar(5000) null,
  CPD varchar(5000) null,
  employalbe varchar(50) null,
  );
  insert into #tmptable( employeeid,name,rank,Birth,evaluationdate )
select distinct "employee"."employeeid","employee"."surname",  "empranktype"."description" ,  "employee"."birthdate" ,  "empevaluation"."evaluationdate"
FROM  "empevaluation" LEFT OUTER JOIN "employee" ON "employee"."employeeid" = "empevaluation"."employeeid"  LEFT OUTER JOIN  "empranktype"  ON "empranktype"."empranktypeid" = "employee"."employeerankid"   
where empevaluation.EMPEVALPROFILEID in (12500000009,12500000010,12500000011,12500000012);

update  #tmptable
set company =(
SELECT top 1 "address"."name"
  from "address" ,"empcontract" where "empcontract"."companyaddressid" = "address"."addressid"
  and "empcontract"."employeeid" = #tmptable .employeeid )  ;
 
update  #tmptable
set Vessel =(
SELECT  "empevaluation"."ZU_VESSEL"
  from "empevaluation" where "empevaluation"."evaluationdate" = "#tmptable"."evaluationdate"
and "#tmptable"."employeeid" = "empevaluation"."employeeid"