Hey everyone. Just signed up last night and had skimmed through  
several of the archives. Excited to partake in future discussions. I'm  
just taking the plunge into SQLite since I'm working with Adobe AIR  
and Flex. I'm building a desktop app that will sync data to a SQLite  
database. I have some experience with SQL Server and have been doing  
research on SQLite to find out what it supports and what it doesn't.

Is it possible in SQLite to have a single statement that basically  
says if this row exists run an UPDATE statement, if not run an INSERT?  
I believe these are done in procedures which I know is not supported  
in SQLite. I've seen a lot of discussions on triggers though and  
wonder if this is maybe something I should look into for what I want  
to achieve? Probably won't do the trick as it seems it runs after a  
data change/operation is made.

I'm just learning and trying to figure out the best way to use SQLite  
through AIR to sync data from the server to the desktop as its only  
one way sync. Trying to make sure I get the best performance. If I can  
cut down on the statements I need to use figure it would help. But for  
now I have a feeling I need to do a SELECT statement to see if that  
row exists and based on that result perform an INSERT or UPDATE. I  
would repeat that for every result from the server.

Ciao!
Javi
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to