Re: [GENERAL] SELECT a value from various tables depending on a column

2004-10-29 Thread Paul Tillotson
What solution to use depends how many other tables and the relative sizes of tables, but the following option has a reasonably good chance: Suppose you have basetable, and joined1, and joined2. Basetable.tablename tells which of the secondary tables to join against (contains either 'joined1' o

[GENERAL] SELECT a value from various tables depending on a column value

2004-10-29 Thread Eric E
Hi, I'm trying to write a recordset-returning function that returns a values from a base table, and one column from a joined table, where the joined table varies according to a field of the base table. I'm looking for an efficieint way to do this, and I don't think I know enough about Postg