![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
#3
| |||
| |||
|
|
Hi Everyone, This can't be right... |
#4
| |||
| |||
|
|
Hi Everyone, This can't be right... |
#5
| |||
| |||
|
|
As far as I remember, varchar does not store trailing spaces [snip]. |
#6
| |||
| |||
|
|
Thank You Roy! So what we need to do is something more along the lines of: select count(*) from test_string where a_string + 'X'=' ' + 'X'; -- two spaces. |
|
-----Original Message----- From: info-ingres-bounces (AT) kettleriver...ting (DOT) com [mailto:info-ingres-bounces (AT) kettleriverconsulting (DOT) com] On Behalf Of Roy Hann Sent: 23 April 2009 13:33 To: info-ingres (AT) kettleriverconsulting (DOT) com Subject: Re: [Info-Ingres] Why are these strings so spacey? Martin Bowes wrote: Hi Everyone, This can't be right... Alas it can be, and it is. From the SQL Reference Manual, on the subject of varchars: "If the strings being compared are unequal in length,the shorter string is padded with trailing blanks until it equals the length of the longer string." What is more, I believe this is ANSI/ISO mandated behaviour, not an Ingres-specific quirk. -- Roy UK Ingres User Association Conference 2009 will be on Tuesday June 9, 2009 Go to http://www.iua.org.uk/join to get on the mailing list. _______________________________________________ Info-Ingres mailing list Info-Ingres (AT) kettleriverconsulting (DOT) com http://www.kettleriverconsulting.com...fo/info-ingres _______________________________________________ Info-Ingres mailing list Info-Ingres (AT) kettleriverconsulting (DOT) com http://www.kettleriverconsulting.com...fo/info-ingres |
![]() |
| Thread Tools | |
| Display Modes | |
| |