On Feb 4, 2008 1:56 PM, Gussimulator <[EMAIL PROTECTED]> wrote: > I have a field I need to update given a condition, but I don't know wether > the condition occurs in table A or table B, how can I perform this query? > > I have 2 identical tables in design, but one contains system data and the > other one contains user data... On my update routine (in C) I have to > increase an INTEGER field from either table given a condition... The thing > is, the condition could be present on both tables... what should I do?? > > Thanks!
I'm no database expert, but why not merge them with a single table, like this? [[ create table MyTable (foo, bar, baz, user_data INTEGER) ]] with user_data=0 for the "system" data, and user_data=1 for the "user" data. Unique/Primary-key constraints can be kept unique by appending the user_data column to the index (how well does SQLite perform with regard to multi-column indices, btw?) -- -- Stevie-O Real programmers use COPY CON PROGRAM.EXE _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users