Re: To force type CHAR in a view
From: Karsten Farell <kfarrell_at_medimpact.com>
Date: Mon, 07 Oct 2002 17:37:09 GMT
Message-ID: <9Djo9.1347$8V2.81385530_at_newssvr14.news.prodigy.com>
Date: Mon, 07 Oct 2002 17:37:09 GMT
Message-ID: <9Djo9.1347$8V2.81385530_at_newssvr14.news.prodigy.com>
See my reply to this question on comp.databases.oracle.misc.
Basically my reply says you might be able to create a 'hack':
- All the character functions (eg, rpad) return a VARCHAR2, so you can't use it to return a CHAR in your view.
- If you can create a view on your table containing a CHAR column, your join will see two VARCHAR2 data types.
To see this:
SQL> create table t1 (x char(10));
SQL> create view v1 as
1 select rtrim(x) varchar_x from t1;
If you describe v1, you'll see that varchar_x is now a VARCHAR2(10). Received on Mon Oct 07 2002 - 19:37:09 CEST