Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: To force type CHAR in a view

Re: To force type CHAR in a view

From: Karsten Farell <kfarrell_at_medimpact.com>
Date: Mon, 07 Oct 2002 20:07:27 GMT
Message-ID: <2Qlo9.1385$fE3.84255903@newssvr14.news.prodigy.com>


Daniel Morgan wrote:
> It can be done directly as I demonstrated.
>
> CREATE VIEW vtest AS
> SELECT dummy, ' ' X
> FROM dual;
>
> That having been done you just UNION ALL your actual query to the template
> created.
>
> But I still think doing it makes no sense.
>
> Daniel Morgan
>

Perhaps I misunderstood what the original poster intended ... or read more into what he said than he intended. I might have done the same with what you wrote. :)

Sure, in your case, X would be a CHAR column, but I couldn't write something like "WHERE X='something'" because X will always be blanks. I'm not sure what the UNION ALL would buy me (other than one extra row in the result set). And I have to agree, that would make no sense.

After trying a few things, I suspect what the OP was trying to say was that when he puts a "char_col = varchar_col" in his where clause, he gets the expected "no rows returned" because Oracle is comparing the padded blanks at the end of the CHAR column. But I won't know if that's true unless the OP supplies more info. Received on Mon Oct 07 2002 - 15:07:27 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US