Can someone please explain this behavior?
I´ve executed the following sentence in Query Analyzer...
SELECT
DISTINCT PID_ID + '|',LEN(PID_ID)
FROM
AGFA_ADT_HIS
WHERE
(PID_ID LIKE '% ') --> there is an space after the % char
ORDER
BY 1
And I get results like this? (Using fixed-width font)
CC0 |, 3
CC03050635007948 |, 16
CC10017751 |, 10
CC100260 |, 8
CC10059647 |, 10
It doen't makes any sense since where part ask for those entries ending in space and according to the LEN function the fields doesn't have trailing spaces whatsover.
I think that the ANSI_PADDING has something to do with it but I'm not sure.
Thanx in advance!
Raptor
BTW: the column is VARCHAR(20)