Hi Cyril
> select whatever into cursor temp
> thedbf = dbf()
> select bigtable
> append from (thedbf)
>
>The question is: Instead of the append from, is there a more sql way of doing the above?
The following is
more SQL'ish. This assumes temp has same structure as bigtable, and the pk constraints aren't being violated:
SELECT temp
SCAN
SCATTER MEMVAR
INSERT INTO bigtable FROM MEMVAR
ENDSCAN
If field names are different, look at the INSERT - SQL statement--you can INSERT from array, and you can explicitly set the values.
I don't know that it would be faster (I haven't benchmarked it or anything) but might be easier to read, if that is what you are looking for.
AFAIK, there is nothing wrong with the way you are doing it. Switching just to be more SQL isn't necessarily a good idea.
Now in more SQL oriented environments (like SQL Server for example) you can have something like this:
INSERT bigTable SELECT * FROM temp
VFP SQL syntax doesn't support this SELECT style AFAIK, so a loop of some sort is necessary.
HTH,
Bill