Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> table with nested records question
Hi,
I got a table with nested records as listed below.
create type test_typ_nested_del as object (
nr1_num1 number(4), nr1_str varchar2(35), nr1_value number(1))
NR2_num number(4),
NR2_rec test_typ_nested_del)
/
Create table test_tbl_nested_del (
D1 number,
D2 test_typ_nested_del1,
D3 number)
/
Insert into test_tbl_nested_del
(d1,d2,d3) values (1,
test_typ_nested_del1(1,
test_typ_nested_del(1,'A',1)),1);
commit;
SQL> select q.d2.nr2_rec.NR1_NUM1 from test_tbl_nested_del q;
D2.NR2_REC.NR1_NUM1
1
SQL> select test_tbl_nested_del.d2.nr2_rec.NR1_NUM1 from test_tbl_nested_del; select test_tbl_nested_del.d2.nr2_rec.NR1_NUM1 from test_tbl_nested_del
*
I am trying to select a column from a nested records withing a table but it won't if I use "test_tbl_nested_del.d2.nr2_rec.NR1_NUM1".
But, interestingly, it works if I use alias for the table name. "q.d2.nr2_rec.NR1_NUM1 from test_tbl_nested_del q;"
It's weird!
Can someone tell me why?
Thanks!
Kevin Received on Tue Jun 11 2002 - 17:27:33 CDT