Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> simple VIEW questions
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? b) is the approach bust? (i.e. making a primary key this way) c) what's the 'right' way to do this? d) do views support [synthesized] primary keys?(I added the 'primary key' in the field name just now- that might produce an error too...?)
best to email replies to forbes_at_world.std.com thanks in advance!
--Received on Wed Apr 23 1997 - 00:00:00 CDT
![]() |
![]() |