APT_ORACLE_PRESERVE_BLANKS equivalent in Teradata
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 23
- Joined: Mon Jan 14, 2008 6:09 am
APT_ORACLE_PRESERVE_BLANKS equivalent in Teradata
Hi,
Is there any equivalent variable as APT_ORACLE_PRESERVE_BLANKS for Teradata database?
Thanks,
Prashanth
Is there any equivalent variable as APT_ORACLE_PRESERVE_BLANKS for Teradata database?
Thanks,
Prashanth
-
- Premium Member
- Posts: 34
- Joined: Fri May 16, 2008 6:24 am
There is no equivalent available for Teradata. May be, not required.
In case of Oracle, the APT_ORACLE_PRESERVE_BLANKS variable affects the whitespace trimming. It is important in case of SQL*Loader, because Oracle removes the spaces and considers fields with only spaces to be NULL values.
But with Teradata, it is different. Teradata by default removes the trailing spaces for CHAR datatypes which doesn't really matter if the column definition has required length defined. Apart from that it doesn't really botch up anything.
So you have to determine why you need this.
In case of Oracle, the APT_ORACLE_PRESERVE_BLANKS variable affects the whitespace trimming. It is important in case of SQL*Loader, because Oracle removes the spaces and considers fields with only spaces to be NULL values.
But with Teradata, it is different. Teradata by default removes the trailing spaces for CHAR datatypes which doesn't really matter if the column definition has required length defined. Apart from that it doesn't really botch up anything.
So you have to determine why you need this.
-
- Participant
- Posts: 23
- Joined: Mon Jan 14, 2008 6:09 am
I am trying to load the Teradata Table using a dataset which contains the Varchar datatypes.
In table also i have all varchar datatypes.
For Example
Table: col1 varchar(10);
Dataset: col1: 'prashanth '
While loading i want to ignore the last spaces and load to the table.
How can we achieve this?
Thanks,
Prashanth
In table also i have all varchar datatypes.
For Example
Table: col1 varchar(10);
Dataset: col1: 'prashanth '
While loading i want to ignore the last spaces and load to the table.
How can we achieve this?
Thanks,
Prashanth
-
- Participant
- Posts: 23
- Joined: Mon Jan 14, 2008 6:09 am
-
- Participant
- Posts: 23
- Joined: Mon Jan 14, 2008 6:09 am
Not that I am aware of... and besides, you don't want to "preserve blanks". Perhaps some Teradata experts need to weigh in here but I'd wager it works like any other database - if you send the field over with spaces in it, that's what you get. If you don't want them you need to trim them before they get that far.
AFAIK, it's only Oracle that plays this crazy automagic trimming game and decides that a field with only spaces in it is 'empty' and that an empty field is the same as a null field. Hence the special Oracle environment variable to shut that off.
AFAIK, it's only Oracle that plays this crazy automagic trimming game and decides that a field with only spaces in it is 'empty' and that an empty field is the same as a null field. Hence the special Oracle environment variable to shut that off.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: