>hey everyone,
>here is the problem. it is like the previous one i have posted but with a new twist. the first problem was a different angle on trying to solve this one. here is the scenario:
>
>i have to table i have set up as alias.
>alias1 and alias2
>
>i then preceed to excecute the following code:
>select alias1
>insert into alias1 ;
> fields ;
>values alias2->fields
>
>the problem is that i only insert one record into alias1 from alias2 when i want to insert all alias2 records. what am i doing wrong?? any suggestions would be appreciated. thanks.
You need to SCAN through the alias2 and do the INSERT INTO alias1 for every record from alias2. If the field names in alias1 and alias2 are the same, you might just use INSERT INTO alias1 FROM MEMVAR command instead of listing the fields and values.
select alias2
SCAN
SCATTER MEMVAR
INSERT INTO alias1 FROM MEMVAR
ENDSCAN
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro
"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison