Igor,

Good point. That's certainly the most straightforward way, which is a  
benefit in itself. Sometimes when you have a really good hammer everything  
starts looking like a nail.

Thanks to all!

Keith

On Jul 20, 2011 2:03pm, Igor Tandetnik <[email protected]> wrote:
> On 7/20/2011 11:21 AM, KeithB wrote:


> > I'd like to create a temporary table to "shadow" one of my persistent


> > tables. It will have the same columns and hold "override" values that,


> > when present, take precedence over the real values. So, I'd like to


> > search for a row by primary key, looking first in the override table,


> > and if not found, then in the real table. The result will always be


> > zero or 1 rows.


> >


> > I can do this with two SELECTs, but that doesn't seem to be the most


> > efficient approach.





> Why not? Whatever clever SQL statement you come up with, SQLite will end


> up doing the same thing - look up the row in override table and then in


> main table. Might as well do this explicitly.


> --


> Igor Tandetnik





> _______________________________________________


> sqlite-users mailing list


> [email protected]


> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users



_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to