Albert,

Forgive me for my ignorance.  I guess I do not understand why I would
get an error when the FETCH command works.  I was able to insert a row
into the table using the insert command without the WHILE command. See
below.

SET VAR vBOLDate = 12/23/2009
CREATE TEMP TABLE tBOLLabels (Lblitem INTEGER, BOLDate DATE, Control#
TEXT 9, OrderNumber TEXT 20, Lblpcs INTEGER, PackageWgt REAL)
DECLARE cBollbl CURSOR FOR SELECT BOLDate, Control# OrderNumber,
PackageQty, 
        PackageWgt FROM BOLRows WHERE BOLDate = .vBOLDate
OPEN cBollbl
FETCH cBollbl INTO vBdate INDIC vi1, vCnum INDIC vi2, vOrdNum INDIC vi3,
+
      vPcs INDIC vi4, vPkgwgt INDIC vi5
INSERT INTO tBollabels (BOLDate, Control#, OrderNumber, Lblpcs,
PackageWgt) +        VALUES (.vBdate, .vCnum, .vOrdNum, '1', .vPkgwgt)


Why would putting the WHILE code before the INSERT clause cause it not
to work?

Jim

This is all new to me so I have to muddle through this.
Sorry to be a bother.


Reply via email to