Problem with PL/SQL code - Please help.

From: Lesley <lesley_at_vimich.com>
Date: Tue, 05 Dec 2000 19:11:09 GMT
Message-ID: <h5bX5.38132$i%4.1084072_at_news20.bellglobal.com>


[Quoted] [Quoted] 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

[Quoted]      v_BillToCoid number(8);
     v_BillToName Varchar2(30);

BEGIN
  v_BillToCoid := :CompanyDir.billcoid;
 if v_BillToCoid is not null then
[Quoted]       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; Received on Tue Dec 05 2000 - 20:11:09 CET

Original text of this message