X-Original-To: pgsql-sql@postgresql.org Received: from anchor-post-31.mail.demon.net (anchor-post-31.mail.demon.net [194.217.242.89]) by postgresql.org (Postfix) with ESMTP id 8CB2F47590C for ; Fri, 14 Mar 2003 05:52:00 -0500 (EST) Received: from mwynhau.demon.co.uk ([193.237.186.96] helo=mainbox.archonet.com) by anchor-post-31.mail.demon.net with esmtp (Exim 3.35 #1) id 18tmnB-000Kla-0V for pgsql-sql@postgresql.org; Fri, 14 Mar 2003 10:52:02 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by mainbox.archonet.com (Postfix) with ESMTP id 8F163175A4 for ; Fri, 14 Mar 2003 10:52:00 +0000 (GMT) Received: from client.archonet.com (client.archonet.com [192.168.1.16]) by mainbox.archonet.com (Postfix) with ESMTP id EC70C175A3 for ; Fri, 14 Mar 2003 10:51:59 +0000 (GMT) Content-Type: text/plain; charset="utf-8" From: Richard Huxton Organization: Archonet Ltd To: pgsql-sql@postgresql.org Subject: Re: View - Join based on dis-similar data types Date: Fri, 14 Mar 2003 10:52:02 +0000 User-Agent: KMail/1.4.3 References: In-Reply-To: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200303141052.02132.dev@archonet.com> X-Virus-Scanned: by AMaViS snapshot-20020531 X-Archive-Number: 200303/359 X-Sequence-Number: 12398 On Thursday 13 Mar 2003 1:48 pm, speakeasy wrote: > Not sure if this ever made it to the group, I can't seem to find it in the > recent message lists. > > "speakeasy" wrote in message news:... > > > I have a field defined as a character(50) data type, and the same field > > stored in a transition table as a text type. > > > > The view itself work based on the join, however sub-queries against the > view > > on that field do not return any data. > > > > Example: > > > > Table1 > > T1Data - Character(50) > > Table2 > > T2Data - Text > > View1: > > --- > > SELECT T1Data from Table1 JOIN Table2 ON (Table1.T1Data =3D Table2.T2Da= ta); > > > > > > A select against View1 > > SELECT * FROM View1 returns all relevant records, however, adding a WHE= RE > > clause produces no output. Can you please provide a real example, otherwise we're just guessing. Are you sure you've not forgotten about the spaces padding your char(50)=20 field? --=20 Richard Huxton