Consultor Eletrônico



Kbase 13078: Oracle DataServer startup -znotrim
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   5/10/1998
Oracle DataServer startup -znotrim


When using PROGRESS Oracle Dataserver, customer are encourage to use
ORACLE's VARCHAR2 datatype instead of CHAR datatype.
If customers do this, they shouldn't have to worry about traling
spaces. By default PROGRESS Oracle dataserver always trims the
left-hand-side (LHS) values of the WHERE clause before comparing it to
the value or variable on the right-hand-side (RHS).

Customers should keep all trailing spaces out of the ORACLE database.
It is difficult to distinguish between "spaces", "spaces ",
"spaces " and "spaces " when they are displayed on the screen or
paper.

This may not be applicable for all customers as trailing blanks may
be a desirable commodity, especially since trailing blanks are
considered significant with the ORACLE data manager.

In order to bypass the default behavior for ORACLE (CHAR datatype
only), the startup option -znotrim is available as a runtime client
parameter for PROGRESS. This startup parameter can be used with
PROGRESS DataServer versions:

6.3E06 (IBM-6000 only)
6.3F (most unix platforms)
7.3A and above

No recompilation necessary.
Remind customers to check pre-existing data for trimmed blanks.
-znotrim only alters the behaviour of trailing spaces in the WHERE
clause. It will always alter the behaviour of the FIND ...WHERE
statements if trailing spaces are stored for VARCHAR2 datatype in
ORACLE database.

Below are some examples:
sql> create table x (x_charfld char(4)
x_varchar varchar2(4));

From Progress session; insert 2 records:
create x.
assign x_char = "a"
x_varchar = "a".

create x.
assign x_char = "b "
x_varchar = "b ".

WITHOUT WITH
QUERY TESTED: -znotrim -znotrim
Found | NOT found Found | NOT Found
Find x where x_char = "a" x x
Find x where x_varchar = "a" x x

Find x where x_char = "a^^^" x x
Find x where x_varchar = "a^^^" x x

Find x where x_char = "b" x x
Find x where x_char = "b^" x x
Find x where x_varchar = "b" x x
Find x where x_varchar = "b " x x

^ represent a single blank space

Progress Software Technical Support Note # 13078