Mike Yearwood
Toronto, Ontario, Canada
>APPEND BLANK updates all the index tags with blank values. Your replace then updates them *again*.
>
>INSERT only writes the single value.
Hi Dan!
I included this performance issue in my mind when I said "Besides the advantages of doing the equivalent of an append blank and a replace all at the same time"
:)
>
>In a loop, the performance difference can be dramatic.
>
>Dan
>
>>Is it just me or is
>>
>>REPLACE ;
>> field1 with expression1, ;
>> field2 with expression2 ;
>> field3 with expression3 ;
>> IN alias
>>
>>You can't get the fields out of synch with the values.
>>
>>Easier to read/maintain/modify than:
>>
>>INSERT INTO alias ;
>> (field1, ;
>> field2, ;
>> field3) ;
>> VALUES ;
>> (expression1, ;
>> expression2, ;
>> expression3)
>>
>>If the field list gets out of synch with the values, that's going to be messy. Not only that, but with a longer list of fields, the chances of error goes up.
>>
>>Besides the advantages of doing the equivalent of an append blank and a replace all at the same time AND SQL compatibility, what other benefits are there to INSERT in VFP?
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement