Copying data from one table to another
Mark Schonewille
m.schonewille at economy-x-talk.com
Fri Aug 21 13:41:09 CDT 2015
Thanks Ruslan. UPSERT really isn't something I could have thought of
myself and no matter what I entered in my fav search engine, I didn't
get to see this command. There really is no way to go to the Valentina
website and find what you need. It looks like UPSERT may be it.
I worry about possible duplicates because I want to make sure that the
customer can't make any mistakes. There may be a reason to run the SQL
script, which I'm writing, multiple times. It isn't just to make things
fool-proof, but it also helps me debugging, since I'll know exactly what
the database of the customer looks like.
--
Best regards,
Mark Schonewille
Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553
Installer Maker for LiveCode:
http://qery.us/468
Buy my new book "Programming LiveCode for the Real Beginner"
http://qery.us/3fi
LiveCode on Facebook:
https://www.facebook.com/groups/runrev/
On 8/21/2015 20:22, Ruslan Zasukhin wrote:
> On 8/21/15, 5:24 PM, "Mark Schonewille" <m.schonewille at economy-x-talk.com>
> wrote:
>
>> Danke für die Antwort, Trixi. I would like to provide my customer with
> syntax
>> that can be executed repeatedly safely. If I use INSERT, multiple
> data may be
>> added to the table, but if I use REPLACE INTO, the table
> would be updated if
>> the records already exist and no duplicate records
> would be created.
>
> Dear Mark,
>
> It is may be very interesting way to try commands from mySQL and say they
> not works in Valentina DB :)
>
> You can also try some MSSQL and Oracle commands. Why not? :-)
>
> Also you can try some Valentina only commands in mySQL and wonder why they
> not work.
>
> Right?
>
>
> ==========
> In Valentina 6.0 we have provide
>
> 1) UPSERT via mySQL style: ³INSERT Š ON DUPLICATE KEY UPDATE²
> is solution for mySQL lovers
> but it is not as strong as
>
> 2) MERGE command, near to SQL 2003 and with some MS SQL ideas.
> mySQL do not have it. Postgre still develop it...
>
>
> ==========
> Next point, you try to copy into new EMPTY table.
> So why to worry about possible duplicates ?
>
>
More information about the Valentina
mailing list