Archives of the TeradataForum
Message Posted: Fri, 04 Aug 2006 @ 20:47:23 GMT
Subj: | | Re: Missbehaving char/varchar data in teradata sql assistent |
|
From: | | Anomy Anom |
<-- Anonymously Posted: Friday, August 04, 2006 16:44 -->
It's always a question for me too, why it's the case even with VARCHAR. I know what happens with CHAR(N), fine. But see below.
---------
ct test(ch varchar(10));
ct test(ch varchar(10));
*** Table has been created.
*** Total elapsed time was 1 second.
BTEQ -- Enter your DBC/SQL request or BTEQ command:
ins test('abc');
ins test('abc');
*** Insert completed. One row added.
*** Total elapsed time was 1 second.
BTEQ -- Enter your DBC/SQL request or BTEQ command:
sel * from test where ch = 'abc ';
sel * from test where ch = 'abc ';
*** Query completed. One row found. One column returned.
*** Total elapsed time was 1 second.
ch
----------
abc
BTEQ -- Enter your DBC/SQL request or BTEQ command:
sel '-'||ch||'-' from test where ch = 'abc ';
sel '-'||ch||'-' from test where ch = 'abc ';
*** Query completed. One row found. One column returned.
*** Total elapsed time was 1 second.
(('-'||ch)||'-')
----------------
-abc-
|