I think you should be able to do this through the use of instead of
triggers.  One for each view, and it would populate the value of
:new.device_type before the insert into the base table.

Sorry, no code, just an idea, but I think it will work.

-Mark
On Wed, 2002-10-16 at 20:23, Vergara, Michael (TEM) wrote:
> This is something I'm not sure can be done.  Can somebody help
> me out?
> 
> I have a single table with a DEVICE_TYPE field, and four views -
> one for each valid device type.  DEVICE_TYPE is a NOT NULL field.
> The views are defined like
>    create view mytype_vw as
>    select col1, col2, col3
>    from   table
>    where  device_type = 'MYTYPE';
> 
> DEVICE_TYPE is not displayed, it is inferred from the view.
> If I want to insert a row through the view, how can I populate
> the DEVICE_TYPE field?
> 
> TIA,
> Mike
> 
> ---
> ===========================================================================
> Michael P. Vergara
> Oracle DBA
> Guidant Corporation
> 
-- 
--
Mark J. Bobak
Oracle DBA
[EMAIL PROTECTED]
"It is not enough to have a good mind.  The main thing is to use it
well."
                                                -- Rene Descartes
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Mark J. Bobak
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to