John Cosmas
2005-06-30 04:13:52 UTC
I have a SELECT statement that I run, which returns a set of records/rows.
After I run the first SELECT, I need to take those results and put it into
another TABLE. However, I don't want to use an INTO TABLE because the
destination table may be in use. I used SCATTER MEMVAR, but it only handles
the first record. Please let me know if there is a workaround to this.
Here is my original code.
SELECT * FROM car_stat ;
WHERE car_stat.K4 = m.pstrSearchK4 AND car_stat.a = m.pstrSearchA ;
PLAIN NOWAIT
SCATTER MEMVAR
USE wrk_car_stat SHARED AGAIN
INSERT INTO wrk_car_stat FROM MEMVAR
USE
After I run the first SELECT, I need to take those results and put it into
another TABLE. However, I don't want to use an INTO TABLE because the
destination table may be in use. I used SCATTER MEMVAR, but it only handles
the first record. Please let me know if there is a workaround to this.
Here is my original code.
SELECT * FROM car_stat ;
WHERE car_stat.K4 = m.pstrSearchK4 AND car_stat.a = m.pstrSearchA ;
PLAIN NOWAIT
SCATTER MEMVAR
USE wrk_car_stat SHARED AGAIN
INSERT INTO wrk_car_stat FROM MEMVAR
USE