Re: where is the error
Posted in 1998
Topics: Stored Procedures & SPL, Server Administration
JunJian:
Stored procedures can't be created from "isql", which is where I suspect
you are trying to create it from. Instead, use "dbaccess". I did and your
script worked fine. Hope this helps.
-- Richard
At 06:59 7/24/98 GMT, jjdai07@my-dejanews.com wrote:
>Hi , Thanks in advance , who can tell me what is the problem of this
>procedure ; system tell me i should modify the RETURNING SMALLINT , it told
>me the point of N is not correct . I run this procedure several time , but it
>not work today , why ???? I will be nervous by it.
>
>Thanks
>
>JunJian (jjdai@pek-co.cn.dhl.com)
>
>
>CREATE PROCEDURE get_tts( r_sorig CHAR(4) , r_sdest CHAR(4) ,
> r_spudow SMALLINT , r_sprod CHAR(2) )
> RETURNING SMALLINT ;> BEGIN
> DEFINE tts SMALLINT ;
> DEFINE err_num INT ;
> SELECT MAX(comp_info_std) INTO tts FROM trans_std
> WHERE origin = r_sorig AND
> dest = r_sdest AND
> day_of_week = r_spudow AND
> product_code = r_sprod AND
> start_event_code = "PU" AND
> end_event_code = "DL" ;
> RETURN tts ;
> END
>END PROCEDURE ;
>
>
> 201: A syntax error has occurred.>
>-----== Posted via Deja News, The Leader in Internet Discussion ==-----
>http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
>
>
--
Richard Caldera
SKECHERS USA, Inc.
MIS Department
richardc@skechers.com
(310) 318-3100 x 1228