Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6947901
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T13:45:09+00:00 2026-05-27T13:45:09+00:00

Basically, I have a supertype( Person) and subtype (Student). I have to insert into

  • 0

Basically, I have a supertype( Person) and subtype (Student). I have to insert into person_objtab a student object. A person object has a REF to Address table and when I’m trying to add new student it gives me ‘missing expression’ error. Here’s the code, any help is highly appreciated!

create type address_objtyp as object (
    Line1 varchar2(30),
    Line2 varchar2(30),
    Line3 varchar2(30),
    Postcode varchar2(10),
    Country varchar2(20)
)
/

create type person_objtyp as object (
    NI varchar2 (20),
    Name varchar2(30),
    Address REF address_objtyp,
    Phone varchar2(30)
)
NOT FINAL
/

CREATE type student_objtyp UNDER person_objtyp (
    Dept_id varchar2(10),
    Course varchar2(10),
    StuYear number,
    Total_credits number
)
/

create table address_objtab of address_objtyp;
create table person_objtab of person_objtyp;

INSERT INTO address_objtab VALUES(
address_objtyp('9',  'Bell', 'Lancashire', ' BB52 4GF', 'the UK')
)
/

This is the statement which fails:

INSERT INTO Person_objtab values 
 (student_objtyp 
     (SELECT  2222, 'Jo', REF(aa), '0161 0450 452', '10', 'Computing', '2', 220 
       FROM address_objtab aa
      WHERE aa.postcode = ' BB52 4GF')
)
/
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T13:45:09+00:00Added an answer on May 27, 2026 at 1:45 pm
    INSERT INTO person_objtab 
    VALUES (student_typ(
            2222,
            'Jo',
            (SELECT REF(b) FROM address_objtab b WHERE line1 = '9 Bell'),
             '01200 233 233',
             10,
             'Computing',
             2,
             220
    ));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I basically have two tables called images and users . The images table has
I basically have a page which shows a processing screen which has been flushed
I basically have the following string in the format: A,B,C:D,E,F What I am trying
I basically have a div on my site that always has the same stuff.
I basically have a table with headers that I read in from a DB
I basically have a class within another class (child). I'm trying to get the
I basically have an object, extended with a function through its prototype. Inside that
Basically have a table of products, something similar to: <table> <tr> <td>Product 1 <br>
I basically have an entity that gets bound to my gridview and has a
I basically have a form that you input chat messages into. It looks like

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.