Re: Forms3.0 Inserts w/in Procedure

From: Carsten Kristensen <ckr_at_ocsbrg.no>
Date: 14 Jan 1994 22:26:48 -0800
Message-ID: <2h82b8$ijg_at_Jupiter.ocsbrg.no>


sullivan_at_sytex.com (mike sullivan) writes:

>Environ: Forms 3.0.16, RDBMS 6.0.36 on Interactive Unix 3.0
 

>I've got a simple procedure:
>PROCEDURE TEST (code NUMBER) IS
>BEGIN
>INSERT INTO TABLE1 (FIELD1,FIELD2,FIELD3,CODE)
> SELECT FIELD1,FIELD2,FIELD3,CODE
> FROM TABLE
> WHERE CODE = code;
>END;
 
>Add'l info: tables TABLE and TABLE1 are defined identically (same
>fields).
 

>Problem: When I run this procedure, ALL the records in TABLE are copied
>to TABLE1, NOT just WHERE CODE=code. If I change 'code' in the where
>clause to :BLOCK1.CODE (I basically call this procecure with the
>syntax TEST(:BLOCK1.CODE) ), it works! If I put a MESSAGE to display the
>value of 'code' in this procedure, the correct value is displayed!
 

>Why will one version work and not the other?

You might want to try changing your where clause to

        WHERE TABLE1.CODE = TABLE.CODE
Regards,

-- 
| Carsten Kristensen		| E-mail: ckr_at_ocsbrg.no 	|
| Offshore Computer Services AS | Tel   : +47 55 99 88 70	|
| Bergen, Norway		| Fax   : +47 55 99 88 84	|
| select std_disclaimer from opinions_not_shared_by_employer;   |
Received on Sat Jan 15 1994 - 07:26:48 CET

Original text of this message