Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250]) by postgresql.org (Postfix) with ESMTP id 109F2474E4E for ; Fri, 26 Apr 2002 16:42:54 -0400 (EDT) Received: from [209.122.114.82] (account ) by davinci.ethosmedia.com (CommuniGate Pro WebUser 3.5.9) with HTTP id 1386026; Fri, 26 Apr 2002 13:42:53 -0700 From: "Josh Berkus" Subject: Re: union query format To: Robert Wynter Cc: pgsql-sql@postgresql.org X-Mailer: CommuniGate Pro Web Mailer v.3.5.9 Date: Fri, 26 Apr 2002 13:42:53 -0700 Message-ID: In-Reply-To: <44586AAA5ECBD511A6520004AC2589A652D827@rssesnexg.rogers.com> MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit X-Archive-Number: 200204/335 X-Sequence-Number: 7599 On Fri, 26 Apr 2002 15:46:21 -0400 Robert Wynter wrote: > Hi Josh, > Thanks for the help. > > Question, How do I format in a union query. Is there a SELECT SQL > code I > could use. I've been trying to find internet code examples to find > that out. Just like you would in a regular query. SELECT to_char(sub_date, 'YYYY-MM-DD') as entry, adv, etc .... UNION ALL SELECT mps, adv, etc ..... (I generally use UNION ALL because it doesn't require the DB to test for uniqueness and thus runs faster in cases where I expect all rows to be unique anyway). -Josh