Re: Problem with PL/SQL code - Please help.

From: DanHW <danhw_at_aol.com>
Date: 07 Dec 2000 06:06:15 GMT
Message-ID: <20001207010615.03242.00003912_at_ng-fx1.aol.com>


>Can someone tell me what I'm doing wrong.
>It seems to fail where the asterisk is. I'm new so forgive my ignorance.
>
>All I want to do is populate a display item with a company name
>corresponding with an id in the same table.
>The BILLTOCOID is a foreign key to COID, both in the COMPANYDIR table.
>
>Is there an easier way to do this??
>Thanks.
>
>This is in the WHEN_NEW_RECORD_INSTANCE trigger of the CompanyDir datablock.
>
>DECLARE
> v_BillToCoid number(8);
> v_BillToName Varchar2(30);
>BEGIN
> v_BillToCoid := :CompanyDir.billcoid;
> if v_BillToCoid is not null then
> select :CompanyDir.CoName *
> into v_BillToName
> from CompanyDir
> where CompanyDir.BillTocoid = CompanyDir.coid;
> end if;
>
> if v_BillToName is not null then
> :CompanyDir.BillCoName := v_BillToName;
> End if
>
>END;

> select :CompanyDir.CoName *
> into v_BillToName

should be

      select CompanyDir.CoName 
      into :v_BillToName


HTH
Dan HW Received on Thu Dec 07 2000 - 07:06:15 CET

Original text of this message