INSERT ... SELECT SQL and APPEND FROM
I first use INSERT ... SELECT SQL statement in my application to append records from [cursor] A into [cursor] B. Before this, I used APPEND FROM for purpose mentioned above. Unfortunely, I got an error
The error message above is very clear. The number of resultset columns to be inserted MUST EXACTLY same with target cursor. Anyhow, I still go thru VFP help file to get *more* information. So dissapointed, error 2119 is not listed in VFP help file. Also, help topic of INSERT...SELECT doesn't mention about this *feature* either. (at least I didn't see any)
Error no. : 2119 Error Message : The number of SELECT values doesn't match the number of INSERT columns.
Therefore, I got to use APPEND FROM. Suddenly I make up my mind to test the performance of INSERT ... SELECT and APPEND FROM. Guess what result do I get in my testing?
APPEND FROM is 2X faster than INSERT ... SELECT statement.
What make APPEND FROM works faster?
Why does INSERT...SELECT be implemented to force both source and target cursor must have same columns number? Is it so to meet ANSI-92 SQL standard?
4 Comments:
Nice. Try reading Merriam Webster. It helps bad grammar.
There are times when the 'native approach' in VisualFoxpro executes faster compared to using the 'SQL approach'... especially if one's dealing with N records where NumDigits(N) < 6.
Keep pumping those nice fox blogs.
WildFire
Thank you for your site. I am trying to improve my english all the time. Any comments are welcome.
Just for the record... I'm not the one who posted the first comment.
[",]
WildFire
Post a Comment
<< Home