Home » SQL & PL/SQL » SQL & PL/SQL » Problems with Timestamp
Problems with Timestamp [message #272162] Thu, 04 October 2007 02:42 Go to next message
carloso
Messages: 2
Registered: October 2007
Junior Member
Hi.
In my company we are working with a table that have a column called Timestamp. So, when i do a store procedured that it makes reference to that table i have the exception ORA-06553: PLS-320 because the table have a column with a reserved word. I read in this foro that i have to changed the name of the column.But that will be very complicated for my project.So, There is some way to make a stored procedure without change the name of the column?. Thanks.


P.D:Sorry my english, but i am from Spain.
Re: Problems with Timestamp [message #272173 is a reply to message #272162] Thu, 04 October 2007 03:07 Go to previous messageGo to next message
Michel Cadot
Messages: 64102
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Unfortunatly timestamp is more than a reserved word it is an internal function and I'm afraid you have to rename the column.
Anyway, having a column whose name is a reserved word is always a bad idea.

Regards
Michel
Re: Problems with Timestamp [message #272177 is a reply to message #272162] Thu, 04 October 2007 03:14 Go to previous messageGo to next message
scorpio_biker
Messages: 154
Registered: November 2005
Location: Kent, England
Senior Member
Forgive me for sticking my oar in but... Cool

We are working on Oracle 9.2.0.7.0 and we have timestamp as a column name throughout our system. This was recently converted from 7.3 where timestamp as a column name wasn't a problem. An executive decision was made to retain the column (not by me I hasten to add) but we don't seem to have any problems as a result.

Maybe carloso can give some more info about his version, the code and where the error message occurs?
Re: Problems with Timestamp [message #272180 is a reply to message #272162] Thu, 04 October 2007 03:23 Go to previous messageGo to next message
carloso
Messages: 2
Registered: October 2007
Junior Member
I have the version 9.2.0.1.0

An example of a stored procedure that don't work is :

create or replace procedure insertar_ejemplo is
begin
insert into SAS.Carlos_Timestamp (ID,MENSAJE,TIMESTAMP) values (null,to_char(Sysdate,'HH:MI:ss'),null);
commit;
end;
Re: Problems with Timestamp [message #272184 is a reply to message #272177] Thu, 04 October 2007 03:33 Go to previous messageGo to next message
Michel Cadot
Messages: 64102
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
I was talking about 10g (when no version is provided, last one is assumed). Behaviour changed with versions.
Even if it works in some versions/patches, better changes the column name now as you WILL have the problem soon.

Regards
Michel
Re: Problems with Timestamp [message #272186 is a reply to message #272162] Thu, 04 October 2007 03:41 Go to previous message
scorpio_biker
Messages: 154
Registered: November 2005
Location: Kent, England
Senior Member
Carlso, can you describe your table, and a cut and paste of the error?

Michel, I agree totally, and I'm sure "our" decision will come back and bite us on the bum at our next upgrade, but given the time it took to do our last one hopefully I'll have retired by then Laughing
Previous Topic: Extracting undo/redo via logminer for one specific transaction?
Next Topic: problem in SUM
Goto Forum:
  


Current Time: Fri Dec 02 18:21:33 CST 2016

Total time taken to generate the page: 0.15093 seconds