ColdFusion Query of Queries Order By Case Sensitivity Fun
[lang_en] Have you ever tried using ORDER BY in a query of queries in ColdFusion, well come to find out its case sensitive, and I need it to be case insensitive.I have a query of queries in ColdFusion. In Windows my original query sorted it self out just fine, because it was listing the underlying File system items which are case insenstive. When I deployed the code on Linux of course the original query sorts differently. The code actually does another query on the first query to add some other fields. But when I did a ORDER BY Name on this query of queries it was Case Sensitive, and thus a capital “Z” came before a lowercase “a”. You can not use the UPPER or LOWER query functions on the ORDER BY clause but you can use them when defining a field.
This led me to the solution below.
UPPER( Name ) as DName
FROM myList
WHERE type = 'Dir'
ORDER BY DName
Is there a built in way in ColdFusion to do this with out create a new column on the query?
[/lang_en]
[lang_zh]
ä½ æœ‰æ²¡æœ‰åœ¨Cold Fusionçš„query of queries试过用ORDER BY?
我å‘现是分大å°å†™ä½†æ˜¯æˆ‘è¦ä¸åˆ†å¤§å°å†™ã€‚我有一个在Cold Fusionçš„query of queriesã€‚å› ä¸ºWindowsçš„filesystem是ä¸åˆ†å¤§å°å†™çš„,我原æ¥çš„query排得很好,但用Linux的时候,很显然原æ¥çš„query排得ä¸ä¸€æ ·ã€‚ 其实,这个代ç ,ä¸ºäº†åŠ ä¸Šå…¶ä»–çš„å—段 ,åšå‡ºå¦å¤–一个query。但是在这个query of queries åšå‡º ORDER BY Name, 它是分大å°å†™,å› æ¤å¤§”Z” 比尔a”早排出æ¥ã€‚å½“ä½ è¦å®šä¹‰å—段,ä½ å¯ä»¥ç”¨UPPER或LOWER功能, 但是ORDER BYä¸è¡Œã€‚
解ç”如下:
除éžä½ 在queryé€ æ–°è¡Œ,ColdFusion有没有别的办法?
[/lang_zh]