View - Join based on dis-similar data types

From: "speakeasy" <nospam_artd(at)speakeasy(dot)net>
To: pgsql-sql(at)postgresql(dot)org
Subject: View - Join based on dis-similar data types
Date: 2003-03-05 19:59:33
Message-ID: gdacnSAwcOe6yvujXTWcoA@speakeasy.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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 = Table2.T2Data);

A select against View1
SELECT * FROM View1 returns all relevant records, however, adding a WHERE
clause produces no output.

Please advise.

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tomasz Myrta 2003-03-05 23:39:53 Re: INTERSECT / where id IN (etc..)
Previous Message Achilleus Mantzios 2003-03-05 18:59:06 Re: sort / limit / range problem