Re: [SQL] Join issue

2006-06-06 Thread Kenneth B Hill
That looks like a very complex query. I would like to suggest that you try doing some nesting queries via a SQL script. Make a "view" with a query, then perform a query using the view, etc. , then drop all views in the SQL script. This may make the entire operation perform faster. -Ken On Tue, 20

Re: [SQL] Query to return modified results at runtime?

2006-06-08 Thread Kenneth B Hill
On Wed, 2006-06-07 at 19:29 -0500, George Handin wrote: > I have a query: > > SELECT * FROM testtable; > > Where the results are: > > IDColor > --- --- > 1 Blue > 2 Red > 3 Green > 4 Orange > > How would I rewrite the query to return results where the colors are > rep

Re: [SQL] Concat two fields into one at runtime

2006-06-08 Thread Kenneth B Hill
On Thu, 2006-06-08 at 10:50 -0500, George Handin wrote: > Is there a way using built-in PostgreSQL functions to combine two data > fields into a single field at runtime when querying data? > > For example, the query now returns: > > idfirstlast > --- --- -- > 1 Goerge