Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB SQL » View Thread |
Messages 1 to 4 of 4 total |
Querying the Collations table |
Sat, Apr 5 2008 10:06 AM | Permanent Link |
Dan Rootham | EDB Manager ver 1.08 Build 1
This query works just fine: SELECT * FROM "Configuration"."Collations" ORDER BY "Name" But this query produces an error: SELECT * FROM "Configuration"."Collations" ORDER BY "Description" The error is: [ ElevateDB Error #700 An error was found in the statement at line 3 and column 10 (Expected Char, GUID, VarChar, . . . . but instead found "Collations"."Description") ] Is it caused by a typo that I can't see, or is it a bug? Thanks, Dan |
Sat, Apr 5 2008 11:19 AM | Permanent Link |
Uli Becker | Dan,
But this query produces an error: SELECT * FROM "Configuration"."Collations" ORDER BY "Description" This should work: SELECT * FROM Configuration.Collations order by cast(description as varchar(1)) |
Sat, Apr 5 2008 11:22 AM | Permanent Link |
"Ole Willy Tuv" | Dan,
<< The error is: [ ElevateDB Error #700 An error was found in the statement at line 3 and column 10 (Expected Char, GUID, VarChar, . . . . but instead found "Collations"."Description") ] Is it caused by a typo that I can't see, or is it a bug? >> It's neither a typo nor a bug. The SQL standard doesn't allow LOB (large object) types in the sort specification. The error message could be more specific, but what it says is that a type different from CLOB or BLOB is expected. I haven't checked it, but I'm pretty sure that the "Description" column is of type CLOB. You need to explicitly cast the CLOB column to CHAR or VARCHAR: SELECT Name, CAST("Description" AS VARCHAR) "Description" FROM "Configuration"."Collations" ORDER BY "Description" Ole Willy Tuv |
Sat, Apr 5 2008 12:45 PM | Permanent Link |
Dan Rootham | Ole,
<< It's neither a typo nor a bug. The SQL standard doesn't allow LOB (large object) types in the sort specification. >> Oh boy, I obviously still have a lot to learn about this SQL standard. Many thanks for the tip! Regards, Dan |
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 |