keepingbusy
Programmer
Hi
How do you join the structures of two tables (say mytable1 and mytable2) into a new table?
Thank you.
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
SELECT [field_list] FROM [tables] WHERE [conditions] INTO TABLE [new_table]
select table1.field1, table1.field2, ...., table2.field1, table2.field2,..... etc etc
here are about 40 fields in one table and about 50 in the other
SELECT Tab1.*, Tab2.* FROM Tab1, Tab2 ;
WHERE .F. ;
INTO TABLE Tab3
SELECT Tab1.*, Tab2.* FROM Tab1, Tab2 ;
WHERE .F. ;
INTO TABLE Tab3
SELECT ORDER1 FROM ORDER2 WHERE ;
(not sure what condition goes here) INTO TABLE ALLORDERS
This wont be an issue as the first table has about 40 fields and the second about 50.Provided the total number of fields doesn't exceed 256, that should work.
SELECT ORDER1.*, ORDER2.* FROM ORDER1, ORDER2 WHERE .F. ;
INTO TABLE ALLORDERS