Hi All,
I am trying to write a program that inserts an address multiple times (have 156 names that need the same address according to the qty field).
Someone said to use the _tally feature with an insert command and I am not too good with this type of programming. I'm more old school with do while commands...
Something similar to the below. quick and easy...
close all
clear
use dealers in 0 alias supp
select supp
select * from supp group by dlrnmbr, qty into cursor control
_tally = qty
select control
SELECT DISTINCT DLRNMBR, QTY FROM CONTROL INTO CURSOR SAMPLES
SELECT SAMPLES
FOR X = 1 TO _TALLY
select dlrnmbr, DEALER, ADDRESS, CITY, STATE, ZIP, count(*) as qty from DEALERS group by dlrnmbr, DEALER, ADDRESS, CITY, STATE, ZIP order by dlrnmbr
I am trying to write a program that inserts an address multiple times (have 156 names that need the same address according to the qty field).
Someone said to use the _tally feature with an insert command and I am not too good with this type of programming. I'm more old school with do while commands...
Something similar to the below. quick and easy...
close all
clear
use dealers in 0 alias supp
select supp
select * from supp group by dlrnmbr, qty into cursor control
_tally = qty
select control
SELECT DISTINCT DLRNMBR, QTY FROM CONTROL INTO CURSOR SAMPLES
SELECT SAMPLES
FOR X = 1 TO _TALLY
select dlrnmbr, DEALER, ADDRESS, CITY, STATE, ZIP, count(*) as qty from DEALERS group by dlrnmbr, DEALER, ADDRESS, CITY, STATE, ZIP order by dlrnmbr