Home » SQL & PL/SQL » SQL & PL/SQL » Problem with Oracle Keyword
Problem with Oracle Keyword [message #335434] Tue, 22 July 2008 03:23 Go to next message
zrelli
Messages: 2
Registered: July 2008
Junior Member
Hello

I have a table called INT. I created a procedure for récuprer stored data. I use this line statement:

SUBTYPE INT_CODITF_U IS INT.CODITF%TYPE



I'm trying to do the compilation, but it displays an error message:

PLS-00487: Reference variable 'INT' Invalid


Thanks
Re: Problem with Oracle Keyword [message #335436 is a reply to message #335434] Tue, 22 July 2008 03:34 Go to previous messageGo to next message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
INT is a keywork and a reserved work, you should not use it for an identifier.

Query v$reserved_words view if you are not sure if you can use a work for an identifier.

Regards
Michel


Re: Problem with Oracle Keyword [message #335441 is a reply to message #335436] Tue, 22 July 2008 03:44 Go to previous messageGo to next message
zrelli
Messages: 2
Registered: July 2008
Junior Member
Hello,

Thank you for your reply. But the problem that the customer who gives names to the tables, not us.

LAYOUNI
Re: Problem with Oracle Keyword [message #335444 is a reply to message #335441] Tue, 22 July 2008 03:54 Go to previous messageGo to next message
pablolee
Messages: 2836
Registered: May 2007
Location: Scotland
Senior Member
create a synonym for the table and reference that in your subtype declaration.

(and ask you customer to be more careful in object naming)

[Updated on: Tue, 22 July 2008 03:55]

Report message to a moderator

Re: Problem with Oracle Keyword [message #335460 is a reply to message #335441] Tue, 22 July 2008 04:25 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
zrelli wrote on Tue, 22 July 2008 10:44
But the problem that the customer who gives names to the tables, not us.


It is your job to tell your customer that they cannot/should not use such names. You are supposed to be the one having the technical insight.
Re: Problem with Oracle Keyword [message #335466 is a reply to message #335441] Tue, 22 July 2008 04:34 Go to previous messageGo to next message
dr.s.raghunathan
Messages: 540
Registered: February 2008
Senior Member
you shall educate your customer if he has any doubt about
reserve word ask him to suffix it by some numerals. (golden thumb rule)My kinder garden teacher suggested this.
Re: Problem with Oracle Keyword [message #335467 is a reply to message #335466] Tue, 22 July 2008 04:41 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
Sorry to say so, but I think that's why he is a kindergarten teacher.
Why would you add a random text to an object-name? (considering an extra number as text) You should always use meaningful names. INT01 instead of INT is NOT meaningful. It suggests that the 01 has a meaning.

[Edit: note that I did not mean to offend any kindergarten teacher; I did not mean to imply that being a kindergarten teacher is in any way less than being a data-modeller.]

[Updated on: Tue, 22 July 2008 04:46]

Report message to a moderator

Re: Problem with Oracle Keyword [message #335469 is a reply to message #335467] Tue, 22 July 2008 04:46 Go to previous message
dr.s.raghunathan
Messages: 540
Registered: February 2008
Senior Member
nice to hear from frank Laughing
Previous Topic: Getting the column name from USER_IND_EXPRESSIONS
Next Topic: pair records from 2 tables
Goto Forum:
  


Current Time: Sat Dec 10 16:30:26 CST 2016

Total time taken to generate the page: 0.06194 seconds