Mike Yearwood
Toronto, Ontario, Canada
I totally agree you, and I have been thinking on this for quite a few months. INSERT is technically superior, "more modern", and yields code better suited for upgrades to SQL, but REPLACE has a much better syntax. It is easier to maintain and less prone to errors.
Every time that I have to write a statement to update several fields I'm confonted with the same dilemma: INSERT state of the art, or REPLACE easier to write-maintain.
>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?
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only