>I want to create a new table using all fields of another table
>
>create table products_tmp as;
>select * from products_tbl
>
If all you want to do is duplicate the structure, not pulling out any records:
USE products_tbl
COPY STRUCTURE TO products_tmp
IF this is truly a temporary table that you want to have go away automagically when you close it:
USE products_tbl
LOCAL aFldList[1,16]
=AFIELDS(aFldList)
CREATE CURSOR products_tmp FROM ARRAY aFldList
If you want to pull some of the data into the table:
SELECT * FROM products_tbl ;
INTO TABLE products_tmp ;
WHERE
record selection conditions
If the data you pull here is read-only, you could use INTO CURSOR to create a read-only cursor here.
Lots of ways to skin this cat...
>The syntax is wrong ????????
>I am working from an ansi standard sql book and I'm stuck !!!!!!
>
>any sample code of other sql basic commands would be great and save me many frustrating hours.
>
>Best wishes
>Colette