Home » SQL & PL/SQL » SQL & PL/SQL » Reference problems
Reference problems [message #36651] Mon, 10 December 2001 06:55 Go to next message
Chad Larsen
Messages: 3
Registered: December 2001
Junior Member
ok so while creating a table with:
column NUMBER(38) REFERENCES db.table(column)
I am getting the error:
ORA-00942: table or view does not exist

but I can select from the referenced db.table ???

any help is much appreciated.

Thanks

--Chad

----------------------------------------------------------------------
Re: Reference problems [message #36653 is a reply to message #36651] Mon, 10 December 2001 08:30 Go to previous messageGo to next message
Suresh Vemulapalli
Messages: 624
Registered: August 2000
Senior Member
why you are converting hd parameter to date inside function,its already date.

sql_statement :=' SELECT * from emp where hiredate < '||''''||hd||'''';

----------------------------------------------------------------------
Re: Reference problems [message #36655 is a reply to message #36651] Mon, 10 December 2001 08:32 Go to previous messageGo to next message
hsc
Messages: 1
Registered: December 2001
Junior Member
As far as I know, u cannot specify db name the way u r doing in ur references clause. It ought to be like .. REFERENCES schema.table(column).
Replace db with schema and try.

----------------------------------------------------------------------
Re: Reference problems [message #36660 is a reply to message #36655] Mon, 10 December 2001 10:45 Go to previous messageGo to next message
Chad Larsen
Messages: 3
Registered: December 2001
Junior Member
Actually I am using the schema.table(column) format .. apologies for the confusion. But still no love :(

----------------------------------------------------------------------
Re: Reference problems [message #36670 is a reply to message #36655] Tue, 11 December 2001 04:23 Go to previous message
Chad Larsen
Messages: 3
Registered: December 2001
Junior Member
Fantastic .. that solved it .. THANK *YOU* :)

----------------------------------------------------------------------
Previous Topic: Regarding Ref Cursor
Next Topic: About database login system trigger
Goto Forum:
  


Current Time: Wed Oct 28 01:08:13 CDT 2020