| timestamp datatype [message #138929] | Sun, 25 September 2005 21:16  | lavanya_pvn Messages: 11 Registered: September 2005 | Junior Member |  |
| hi....
when we create a table with timestamp datatype ....and the column name also as timestamp its created and we can perform all the operations on the table i.e,
create table a (timestamp timestamp);
but if we use this table in a trigger it is giving 'trigger created with compilation errors' , why? | |
|
|
| Re: timestamp datatype [message #139011 is a reply to message #138929 ] | Mon, 26 September 2005 05:17   | sharan_it Messages: 131 Registered: July 2005 Location: Chennai | Senior Member | |
| C2K@FXUT> create table a (timestamp timestamp);
Table created.
C2K@FXUT> insert into a values(sysdate);
1 row created.
C2K@FXUT> select * from a; select * from a * ERROR at line 1: ORA-03115: unsupported network datatype or representation
C2K@FXUT> desc a; Name Null? Type ------------------------------- -------- ---- TIMESTAMP UNDEFINED
see type is not supporting (This is in Oracle 9i only) | |
|
| Re: timestamp datatype [message #139014 is a reply to message #138929 ] | Mon, 26 September 2005 05:24   | sharan_it Messages: 131 Registered: July 2005 Location: Chennai | Senior Member | |
| 1 CREATE OR REPLACE TRIGGER trg_test 2 AFTER INSERT ON a 3 BEGIN 4 DBMS_OUTPUT.PUT_LINE('Trigger fired successfully'); 5* END; 6 / AFTER INSERT ON a * ERROR at line 2: ORA-06552: PL/SQL: Compilation unit analysis terminated ORA-06553: PLS-320: the declaration of the type of this expression is incomplete or malformed
C2K@FXUT> select * from v$version;
BANNER ---------------------------------------------------------------- Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production PL/SQL Release 9.2.0.1.0 - Production CORE 9.2.0.1.0 Production TNS for 32-bit Windows: Version 9.2.0.1.0 - Production NLSRTL Version 9.2.0.1.0 - Production
C2K@FXUT> desc a; Name Null? Type ------------------------------- -------- ---- TIMESTAMP UNDEFINED | |
|
|
| Re: timestamp datatype [message #139036 is a reply to message #138929 ] | Mon, 26 September 2005 06:17   | sharan_it Messages: 131 Registered: July 2005 Location: Chennai | Senior Member | |
| C2K@FXUT> create table a(timestamp timestamp);
Table created.
C2K@FXUT> insert into a values(sysdate);
1 row created.
C2K@FXUT> select * from a; select * from a * ERROR at line 1: ORA-03115: unsupported network datatype or representation
C2K@FXUT> desc a; Name Null? Type ------------------------------- -------- ---- TIMESTAMP UNDEFINED
C2K@FXUT> select * from v$version;
BANNER ---------------------------------------------------------------- Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production PL/SQL Release 9.2.0.1.0 - Production CORE 9.2.0.1.0 Production TNS for 32-bit Windows: Version 9.2.0.1.0 - Production NLSRTL Version 9.2.0.1.0 - Production
why am only getting error???? I tried to do the same u did... | |
|
|
| Re: timestamp datatype [message #139063 is a reply to message #139036 ] | Mon, 26 September 2005 08:02   | Art Metzer Messages: 2477 Registered: January 2003 | Senior Member | |
| Are you using database links in any way?
Did you check out what the documentation had to say about the error message? | Quote: | ORA-03115 unsupported network datatype or representation
Cause: A user bind or define, or an Oracle function, is not supported by this heterogeneous Net8 connection.
Action: Upgrade the older version of Oracle and try again. | Please also read this AskTom thread, "accessing a higher version database from lower.". | |
|
|
| Re: timestamp datatype [message #139250 is a reply to message #138929 ] | Tue, 27 September 2005 00:48   | sharan_it Messages: 131 Registered: July 2005 Location: Chennai | Senior Member | |
| | Noo am not using any db links | |
|
| Re: timestamp datatype [message #186361 is a reply to message #139250 ] | Mon, 07 August 2006 12:52   | plsql Messages: 1 Registered: August 2006 | Junior Member | |
| Guess:may be you are using 8i client to connect the 9i database. Solution: To solve this problem connect the database using 9i client and works fine. | |
|
| Re: timestamp datatype [message #186365 is a reply to message #138929 ] | Mon, 07 August 2006 13:18   | Bill B Messages: 426 Registered: February 2005 | Senior Member | |
| | Oracle reserved words may NOT be used to name objects such as tables, views, triggers, procedures, columns, constraints...etc. Timestamp is a reserved word and you may NOT use it for a column name. Reserved words are things like timestamp, date, integer, varchar2, char.... | |
|
| Re: timestamp datatype [message #186391 is a reply to message #186361 ] | Mon, 07 August 2006 15:16  | joy_division Messages: 1322 Registered: February 2005 Location: NY | Senior Member | |
| | I hope OP didn't hold their breath for the 11 months it took between the last answer and today (07-AUG-2006). |
|