Forms3.0 Inserts w/in Procedure
From: mike sullivan <sullivan_at_sytex.com>
Date: Fri, 14 Jan 1994 05:26:28 GMT
Message-ID: <TmN5Fc1w165w_at_sytex.com>
Date: Fri, 14 Jan 1994 05:26:28 GMT
Message-ID: <TmN5Fc1w165w_at_sytex.com>
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?
--- sullivan_at_sytex.com (mike sullivan) Access <=> Internet BBS, a public access internet site Sytex Communications, Arlington VA, 1-703-528-4380Received on Fri Jan 14 1994 - 06:26:28 CET