Re: SPL problem
Posted in 1999
Surfer here. 'mytable' and 'property' are typos on my part as is
missing the 'values' from the insert - but note that the error has
occurred before we got anywhere near the insert.
The version of dbaccess is 7.24.UE8 on Solaris 2.6.
The problem turned out to be using isql instead of dbaccess! I knew it
would be something silly!
Thanks for all the help.
In article <37EFC7C8.913E763F@bloomberg.net>, Art S. Kagel
<kagel@bloomberg.net> writes
>Umm isn't the table named "mytable" so the LIKE clauses should be
>mytable.pro_ref, etc or is that a simplification typo from posting?
>
>"Surfer!" wrote:
>>
>> Can anyone point out the undoubtedly silly mistake in the following code
>> snippet. 'mytable' was created correctly:
>>
>> =======================================================================
>> create table mytable(
>> pro_ref char( 16 ),
>> app_reg_no integer,
>> total_pts integer,
>> local_pts integer );>>
>> create procedure upd_prop(
>> p_pro_ref like property.pro_ref,
>> p_stat like property.stat,
>> p_fut_st like property.fut_st )>>
>> delete from mytable where pro_ref = p_pro_ref;>> # ^
>> # 201: A syntax error has occurred.
>> #
>>
>> if ( p_stat = "2" and p_fut_st is NULL )
>> or p_fut_st = "4" then
>> insert into mytable ( p_pro_ref, TODAY );>> end if
>> end procedure
>> ========================================================================
>>
>> TIA!
>>
>> --
>> Surfer!
--
Surfer!