Hi All,
I'm new to MariaDB. Is there a similar MERGE (update/insert) in MariaDB Class or similar?
MERGE function/method in MariaDB (SOLVED)
MERGE function/method in MariaDB (SOLVED)
Last edited by fraxzi on Wed May 16, 2018 6:33 am, edited 1 time in total.
Kind Regards,
Frances
Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
Frances
Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
-
- Posts: 1163
- Joined: Mon Oct 17, 2005 5:41 am
- Location: Belgium
- Contact:
Re: MERGE function/method in MariaDB
Regards,
Marc
FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Marc
FWH32+xHarbour | FWH64+Harbour | BCC | DBF | ADO+MySQL | ADO+MariaDB | ADO+SQLite
Re: MERGE function/method in MariaDB
Marc Vanzegbroeck wrote:Frances,
Do you mean the update query?
https://dev.mysql.com/doc/refman/8.0/en/update.html
Hi Marc,
In ADS there is MERGE where it insert a record if not exist then update it if exists.
Kind Regards,
Frances
Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
Frances
Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
Re: MERGE function/method in MariaDB
Hi All,
I think I found it...
https://mariadb.com/kb/en/library/insert-on-duplicate-key-update/
I will try this sooner..
I think I found it...

https://mariadb.com/kb/en/library/insert-on-duplicate-key-update/
I will try this sooner..

Kind Regards,
Frances
Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
Frances
Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
- nageswaragunupudi
- Posts: 10729
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Been thanked: 10 times
- Contact:
Re: MERGE function/method in MariaDB (SOLVED)
All this is simpler if you use FWH Maria DB
If the last param is .T., this will update in case of duplicate or insert if it is not duplicate.
Code: Select all | Expand
oCn:Insert( <ctable>, <fieldlist>, <aValues>, .T. ) // last param .T.
If the last param is .T., this will update in case of duplicate or insert if it is not duplicate.
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
Re: MERGE function/method in MariaDB (SOLVED)
nageswaragunupudi wrote:All this is simpler if you use FWH Maria DBCode: Select all | Expand
oCn:Insert( <ctable>, <fieldlist>, <aValues>, .T. ) // last param .T.
If the last param is .T., this will update in case of duplicate or insert if it is not duplicate.
Hi Mr. Rao,
This is much better!

Thanks,
Frances
Kind Regards,
Frances
Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15
Frances
Fivewin for xHarbour v18.07
xHarbour v1.2.3.x
BCC 7.3 + PellesC8 ( Resource Compiler only)
ADS 10.1 / MariaDB
Crystal Reports 8.5/9.23 DE
xMate v1.15