Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ SQL » Fields
Re: Fields [message #4164 is a reply to message #4163] Wed, 26 July 2006 10:38 Go to previous messageGo to previous message
unodgs is currently offline  unodgs
Messages: 1367
Registered: November 2005
Location: Poland
Ultimate Contributor

aroman wrote on Wed, 26 July 2006 03:54

I didn't actually read all the way through your post, I noticed this:

sql * Insert(TABLE)(C0, "a")(C1, 1)(C3, 2)
if(duplicate())
  sql * Update(TABLE)(C0, "a")(C1, 1)(C3, 2)


In sqlite, at least, you can use "REPLACE" to insert or update. According the the sqlite documentation, it's also in mysql:
http://www.sqlite.org/lang_replace.html

Perhaps that should be added to the sql interface.

=)
- Augusto


It is not only about sqlite3 Wink MS SQL Server (which I use in my projecte doesn't have such a possibility (or I missed sth..)
But for example in MySql there is Insert into... on duplicate key update or sth similar.
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Sqlite3 int64 / wstring support patch
Next Topic: SqlArray Insert
Goto Forum:
  


Current Time: Mon Jun 23 12:04:26 CEST 2025

Total time taken to generate the page: 0.04120 seconds