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: simple VIEW questions

Re: simple VIEW questions

From: Lun Wing San <rdbms_at_hkstar.com>
Date: 1997/04/27
Message-ID: <33638393.5136@hkstar.com>#1/1

John M Forbes wrote:
>
> Here's the requirement:
> Another product will be accessing the Oracle database via SQLnet.
> It requires a single table/view with a primary key.
> I am building a view for it to use from two tables.
> Each table has a numeric primary key.
> So I'm doing something like:
>
> create view foo (primary key mykey, boo, goo)
> as
> select (convert(varchar(16), tbl1.pkey) + convert(varchar(16), tbl2.pkey)),
> tbl1.field1, tbl2.field2
> from tbl1, tbl2
>
> I'm getting a 'missing expression' on the 'select' line.
> a) is my syntax bust?

  Yes

> b) is the approach bust? (i.e. making a primary key this way)

  Yes

> d) do views support [synthesized] primary keys?

  It is based on the base tables.

-- 
***************************************************************************** 
*                                                                           *
* Please go to http://www.hkstar.com/~rdbms/oracle.htm to find other solns  *
*                                                                           *
***************************************************************************** 

---
Name   : Lun Wing San (Certified Oracle Database Administrator)

Title  : Oracle Database Administrator and System Administrator of QRC
Phone  : (852)27885841

This posting represents the personal opinions of the author. It is not the
official opinion or policy of the author's employer. Warranty expired when you
opened this article and I will not be responsible for its contents or use.
Received on Sun Apr 27 1997 - 00:00:00 CDT

Original text of this message

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