Home » RDBMS Server » Server Administration » Restriction on the length of the names of date-fields?
Restriction on the length of the names of date-fields? [message #158777] Tue, 14 February 2006 06:16 Go to next message
kopinsky
Messages: 7
Registered: February 2006
Junior Member
Hello,

i´m not sure if this is the right forum to post my question, so please redirect me if i´m at the wrong place here.

My problem comes down to this: i have quite a big database and an visual basic-application that works on that db. until today, this worked fine. now i encounter strange behaviours of the application, most of all that it can´t find certain columns. So i looked closer at the database and found out that when i make a select on a certain table (with sql plus) i get a resultset in which some column names are truncated to 8 characters. The funny thing is that only fields of the datatype "date" are truncated. A varchar field with the name "MELDBTROFBNACHRI" is shown collectly but a date-field with the name "ERSTERFASS" becomes "ERSTERFA".

I did a couple of changes to the database recently but can´t see what they can have to do with this. What i did was that i changed a couple of indexes and deleted trigger. But none of this was done with date-fields and on this particular table i only reassigned the primary key.

Can anyone give me a hint on what is wrong here and why this is suddenly happening?

Thanks in advance for any help.
Christoph

Oracle Server 9i
Windows 2000 Pro
Re: Restriction on the length of the names of date-fields? [message #158779 is a reply to message #158777] Tue, 14 February 2006 06:23 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
>> (with sql plus) i get a resultset in which some column names are truncated to 8 characters
This is just formatting.
Your problem might be something else.
Post more information.
Try DESC
DNAME
--------------
ACCOUNTING
RESEARCH
SALES
OPERATIONS

scott@9i > column dname format a30
scott@9i > /

DNAME
------------------------------
ACCOUNTING
RESEARCH
SALES
OPERATIONS

scott@9i > column dname format a3
scott@9i > /

DNA
---
ACC
OUN
TIN
G

RES
EAR
CH

SAL
ES

OPE
RAT
ION
S
scott@9i > desc dept
 Name                                                  Null?    Type
 ----------------------------------------------------- -------- ------------------------------------
 DEPTNO                                                         NUMBER(2)
 DNAME                                                          VARCHAR2(14)
 LOC                                                            VARCHAR2(13)

Re: Restriction on the length of the names of date-fields? [message #158784 is a reply to message #158779] Tue, 14 February 2006 06:58 Go to previous messageGo to next message
kopinsky
Messages: 7
Registered: February 2006
Junior Member
hmmm, first of all i get the truncated column name also when i select data from the database via oledb. And what confuses me is: why does it truncate ONLY columns of the type date and not all the others?

Here is part of the description of my table:

 TNR                              NOT NULL NUMBER(38)
 VNR                              NOT NULL NUMBER(38)
 ERSTERFASS    			           DATE
 AKTZ                                      VARCHAR2(50)
 AKTZWJH                		   VARCHAR2(50)
 AKTZLDS                                   VARCHAR2(50)
 EIGNER_K                                  NUMBER(38)
 MELDBTROFBNACHRI                          CLOB
 INHALT                                    NUMBER(38)
 MERKZETTEL                                CLOB
 BEARBENDE                                 DATE


And here is what i get, when i do a select:

TNR    VNR     ERSTERFA AKTZ              AKTZWJH  AKTZLDS EIGNER_K MELDBTROFBNACHRI INHALT MERKZETTEL BEARBEND        
------ ------- -------- ----------------- -------- ------- -------- ---------------- ------ ---------- --------
1      100001  06.02.06 51.1.3/H/00001/06                  3                         0      

As you can see, only the date-fields are truncated. Funny ey?

Ok, i try to describe what i did lately:

We have a visual basic 6-application that works on a oracle-database and until a couple of days ago, the version of our oracle server was 8.1. We used the Microsoft oledb-provider to connect to the database. I then installed the 9i-server, imported our database and connected the application. It still worked. I then changed to the Oracle oledb-provider, because i wanted to change fields of the datatype long to clob, which are only supported by the oracle oledb-provider. Everything was fine, the application was still working. I then did a couple of redefinitions of the table-definitions. What i did was that i changed, as i mentioned above, long-columns to clob-columns. I deleted a couple of triggers and i changed the constraints in most of the tables definitions (some where deleted, some where added). In the particular table, shown above, i only changed the primary key, which used to be "tnr and vnr" and is now only "vnr". And i changed some columns to clob.

That is all i can remember. Any ideas?

Thanks for your help.
Christoph
Re: Restriction on the length of the names of date-fields? [message #158788 is a reply to message #158784] Tue, 14 February 2006 07:13 Go to previous message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
There is NO problem at all.
This is just formatting!.
Paraphrasing another frequent contributor
default behaviour is context dependent.
default behaviour is not standard behaviour.

scott@9i > select sysdate as Today_Date from dual;
TODAY_DAT
---------
14-FEB-06

scott@9i > select to_char(sysdate,'dd-mon-yyyy HH24:mi:ss') as Today_date from dual;

TODAY_DATE
--------------------
14-feb-2006 08:07:19


Previous Topic: error while creating materialized view...
Next Topic: 9.2.0.7 Upgrade together with CPU
Goto Forum:
  


Current Time: Fri Sep 20 15:28:59 CDT 2024