Re: How to insert null columns in a view?
Date: 28 Oct 92 17:29:08 GMT
Message-ID: <1992Oct28.173529.55_at_bmwf1f.bmwf.gv.at>
In article <1992Oct27.212317.572_at_netcom.com>, sjs_at_netcom.com (Stephen Schow) writes:
> I need to create a view that has various columns from several tables
> as well as a few columns with nothing but null values in them. If I use
> an alias, I can name these null columns and I can put the literal value
> of null into them, but what if I want a particular column to be
> a char(10) column with nothing but nulls?
>
> Any help?
>
> I figured a work around by just selecting from a dummy table that has
> just one record with a char(10) column containing null. But I would rather
> not have to select from a table.
>
CREATE VIEW test AS
SELECT SUBSTR(REPLACE(' ',' ',NULL),1,10) NULL_FELD10
FROM dual
/
DESC test
Name Null? Type --------------------------- ---------- ---- NULL_FELD10 CHAR(10)
kind regards
Mike
^ Federal Ministry of Science and Research B | M <-------------------------------------------------------------------------+----> Computer Center W | F | Klaus-Michael Hatzinger mail: hatzinger_m_at_bmwf1f.bmwf.gv.at | Bankgasse 1/209 phone: 0043-222-53120/5188 | 1014 Vienna, Austria fax: 0043-222-53120/5155 V ================================================================================Received on Wed Oct 28 1992 - 18:29:08 CET