union query format

From: Robert Wynter <rgwynter(at)rci(dot)rogers(dot)com>
To: "'pgsql-sql(at)postgresql(dot)org'" <pgsql-sql(at)postgresql(dot)org>
Subject: union query format
Date: 2002-04-26 16:04:12
Message-ID: 44586AAA5ECBD511A6520004AC2589A652D81F@rssesnexg.rogers.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi I'm trying to combine 3 query's in a union query as follows:

rowdate nco nca nch aht asa svl %abandon

With Query 1;

04/01/02 1000 500 500 450 23 .23 .50
04/02/02 2000 500 1500 450 23 .23 .50

plus Query 2;

wtd 3000 1000 2000 450 23 .23 .50

and Query 3;

mtd 3000 1000 2000 450 23 .23 .50

I have 2 problems once the Union Query has run.
1. because Query 2 & 3 are text, it's forcing Query 1 into text and the
date order is all messed up.
2. I need to formate the fileds for svl & % abandon as a percentage.

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2002-04-26 16:04:25 Re: view on system tables upgrade?
Previous Message Nick Fankhauser 2002-04-26 15:58:16 How do I create unique IDs for an existing set of records