Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB SQL » View Thread |
Messages 1 to 6 of 6 total |
Insensitive result set |
Sun, May 11 2008 10:14 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Tim
select * from companies order by _Name Produces an insensitive result set even though a sensitive one was requested. There is an index called CompanyName which is _Name COLLATE ANSI_CI ASC Why is it insensitive? EDB 1.09b3 Roy Lambert |
Mon, May 12 2008 4:21 AM | Permanent Link |
"Ole Willy Tuv" | Roy,
<< Why is it insensitive? >> Because the implicit collation of the sort specification doesn't match the collation of the available index. The default collation in EDB is ANSI (case sensitive). To get a sensitive result set, you must explicitly specify the matching collation: select * from companies order by _Name collate ANSI_CI Ole Willy Tuv |
Mon, May 12 2008 6:15 AM | Permanent Link |
"Jose Eduardo Helminsky" | Roy
I have realized that it is interesting to define COLLATE at field level and you can use the SQL statement without any COLLATE clause. Eduardo |
Mon, May 12 2008 7:04 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Ole
So simple when you know Roy Lambert |
Mon, May 12 2008 1:08 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Eduardo,
<< I have realized that it is interesting to define COLLATE at field level and you can use the SQL statement without any COLLATE clause. >> Yes, and you're also guaranteed that both indexed and non-indexed searches will return the same data. -- Tim Young Elevate Software www.elevatesoft.com |
Mon, May 12 2008 1:22 PM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Jose
Yeah, I've decided all of my VARCHAR's are becoming ANSI_CI - should make life a lot easier, at least for SQL for Delphi I'll just need to LowerCase both sides of comparisons. Roy Lambert |
This web page was last updated on Tuesday, April 30, 2024 at 03:55 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |