I hate this application!

sigzero on 2005-10-13T16:32:27

I am venting, pure and simple.

I am the admin on an application that was ported off of a mainframe and designed for one small company (1 district). I have 9 districts and the potential is over 50. That fact alone makes this thing a beast to work with. To add frosting to the cake, it was ported to Oracle on the backend and a Delphi front end on the Windows server. The front end is basically just a screen for the data but it controls the schema of the Oracle database. The Oracle database is one big hurkin flat database and every field is padded with SPACES! Meaning if the field "could" be 30 characters long and only 5 are inserted the other 25 are SPACES! That is so so annoying when I am trying to pull data out. "Why didn't that work? Oh, I forgot to rtrim() the data." It sucks! The data dictionary is not a lot of help either. I basically have to guess what tables talk to what tables because it isn't in the Oracle database but the front end controls it yet unless you are the 3rd party that created the app, you have no way to see that schema. I kid you not.

It is the most frustrating application to work with that I have ever worked with in my 13+ years of admin work and 1+ years using Perl to make my job easier.

Sorry, I had to vent.


Trailing spaces

gsiems on 2005-10-13T19:51:05

Sounds like your Oracle columns are char datatype. Do you have the option of changing the char columns to varchar2 and then triming the contents of the columns? (that would at least deal with the trailing whitespace issue)
i.e.:

SQL> CREATE TABLE temp_ggs (col1 CHAR(2), col2 CHAR(4), col3 CHAR(20), col4 DATE, col5 NUMBER);

Table created.

SQL> DESC temp_ggs

...

SQL> SELECT 'ALTER TABLE ' || table_name || ' MODIFY ' || column_name || ' VARCHAR2(' || data_length || ');'
FROM all_tab_columns
WHERE data_type = 'CHAR'
AND table_name = 'TEMP_GGS';

'ALTERTABLE'||TABLE_NAME||'MODIFY'||COLUMN_NAME||'VARCHAR2('||DAT A_LENGTH||');'
---------------------------------------------------------------- ----------------
ALTER TABLE TEMP_GGS MODIFY COL1 VARCHAR2(2);
ALTER TABLE TEMP_GGS MODIFY COL2 VARCHAR2(4);
ALTER TABLE TEMP_GGS MODIFY COL3 VARCHAR2(20);

3 rows selected.

SQL> ALTER TABLE TEMP_GGS MODIFY COL1 VARCHAR2(2);

Table altered.

SQL> ALTER TABLE TEMP_GGS MODIFY COL2 VARCHAR2(4);

Table altered.

SQL> ALTER TABLE TEMP_GGS MODIFY COL3 VARCHAR2(20);

Table altered.

SQL> DESC temp_ggs

...

Re:Trailing spaces

sigzero on 2005-10-14T14:40:49

I do not have that option. I would if I had control of the database but alas I am stuck. Yet another reason why I hate this app.

rtrim issue

milardj on 2005-11-30T14:46:24

Meaning if the field "could" be 30 characters long and only 5 are inserted the other 25 are SPACES! That is so so annoying when I am trying to pull data out.

Is the issue pulling data from the Delphi front end or from your own perl scripts? If the latter then look at ora_ph_type which should resolve your problem for you. Also check out the ChopBlanks attribute as well - you will almost always want to use it.

If you are talking about Delphi then please ignore...