SQLite ORDER BY (sort) is completely messed up

Or I'm wrong... ;-)

My table1 has this data:

ID Field1
-- ------
1  222
2  aaa
3  bbb
4  ccc
5  AAA
6  BBB
7  CCC
8  111

When I run the following query

SELECT * FROM table1 ORDER BY Field1 ASC

The result is the following:

ID Field1
-- ------
8  111
1  222
5  AAA
6  BBB
7  CCC
2  aaa
3  bbb
4  ccc

It seems that the default sort order is a number, lowercase letters in alphabetical order, Lesstes in alphabetical order...

What is strange... anyone have any suggestions?

should do more research before posting... google just a response... but just in case where someone else runs into this is the default sort order in sqlite based byte (and a and a have different values) and you add NOCASE COLLECTION until the end of the order of...

SELECT * FROM table1 ORDER BY Field1 COLLATE NOCASE

result:

ID Field1
-- ------
8  111
1  222
2  aaa
5  AAA
3  bbb
6  BBB
4  ccc
7  CCC

Tags: BlackBerry Developers

Similar Questions

  • Completely messed up the Y580

    Hello

    After months of use, my brand-new Y580 is completely messed up (thanks to God that I already backed up all my important data).

    When Im laptop computer startup, there is just a Lenovo logo and loading symbol. It keeps forever - its just like loading 30 minutes... then I got especially BSOD with error: DRIVER_POWER_STATE_FAILURE.

    And then it restarts and there again, still...

    And SOMETIMES (very rare) - it support all Windows 8 (after tens of minutes) - and then after a few minutes, my system completely freeze - all of the peripheries (mouse, etc.) will stop working.

    When I try checkdisc, or the recovery of the system, its just load forever and nothing happens.

    The only thing I can do is to access my BIOS, I can't get Starter same menu Windows (F8).

    Is there a simple way how can I completely format? And when I do this - where can I get copy of Windows 8, I had installed on my laptop? I not found any disk media in the box with laptop.

    Thank you very much. I wil ltry anything, but on Monday im going to push this piece of not worksheets in some services. It is nonsense for a 1 K$ + laptop.

    Note of the moderator; swearing / blasphemy implicit deleted. Keep it clean! Forum rules


  • [JS CS5.5] Sort order for the topic index messes up script

    I'm stumped on this one. If anyone has a suggestion, I would appreciate it!

    The following script iterates through my index and works very well if none of the index entries have "sort by" text that causes the entry down the list in alphabetical order. It works fine if the text ' sort by ' causes the index entry back into the list alphabetically.

    = CODE

    var myTopics = myDoc.indexes [0] .allTopics;

    for (var i = myTopics.length - 1; I > - 1; i--) {/ / for each subject index...}

    for (var j = myTopics [i].pageReferences.length - 1; j > - 1; j--) {/ / for each reference page in the topic...}

    var myAttributeValue = topic_path (myTopics [i], myTopics [i] .name);

    var myInsertionPoint is myTopics [i] [j] .pageReferences, .sourceText;. THIS LINE THROWS ERROR

    Do something at the insertion point.

    }

    }

    }

    Create the subject string. Subheadings are separated by "#".

    function topic_path (top, str) {}

    If (top.parent.constructor.name == 'Index') {}

    return str;

    }

    else {}

    Return topic_path (top.parent, top.parent.name + ', ' + str);

    }

    }

    = END OF CODE

    So it seems to me that given that the script is an iteration through the bottom-up index entries and page references, happens to a topic that is displayed below the list in, but it is actually "" upward earlier in the list alphabetically, so the script can not get corresponds to the page in the source text reference.

    Is it possible to iterate through index entries other than what I do? I don't see any alternative workaround.

    No, you nothing is missing! Sorry, I had assumed just because you can add script tags to practically anything, you could add them to the topics as well. But now that I checked, it turns out that you can't. Two ways out that could be

    (1) temporarily add sort by name of the item, separated by a single, empty string field to sort by. Subsequently restore the field sort by and the name of the topic.

    (2) If for any reason, you can add the value of sorting by name, you will need to build a table with the topic names and sort by values, blank the sort by fields, then restore them later using the table.

    Complicated, but nothing else I can think.

    Peter

  • Completely messed Finder - OSX 10.9.5

    Finder looks like this or other messed up ways, no idea how to solve this problem. Help, please

    You have restarted the computer?

    Have you tried the computer in Mode safe?  Try safe mode if your Mac does not end commissioning (formerly: what is Safe Boot, Safe Mode?) (Mac OS X)) - http://support.apple.com/HT201262 - "You can use safe mode to help you solve any problems that might keep your Mac to boot completely."

  • Descending order to sort (Ascending vs.) Explorer

    I usually keep my directories sorted by file name.  If I have a directory sorted (in ascending order) and I copy to a new file and right click on the open space and choose ' sort by ', then 'name', it REVERSES the order of file!  The "Crescent" and "descendant" options are grayed out.  Note: She ALWAYS reverses the order.  If I first sort by name (for example it is now in ascending order) and then copy to a file and choose "Sorting nickname", in descending order.  Now, if I copy into another file and choose "Sorting nickname", is in the order of the CRESCENT.  Help!  It's embarrassing.  I suspect that a switch from adjustable to always sort in ascending order simple registry.  Or is there another problem?

    Instead of right clicking on an empty space, try clicking on the arrow next to the display of the toolbar button and select "Details", then click on the 'Name' column and there should be a small arrow above the column indicating the order in which it is in. If you do not get the idea and merges with what is ascendant and descendant, ascendant is sort of a to z and the descent is quite the opposite. Tell me if that does nothing :)

  • How to implement Natural Order String sorting in ADF

    I have a table/content tree, in which a columns have alphanumeric string. I want to sort this column in the natural sort order.
    By default in the ADF, sorting of alphanumeric strings is ascii.

    Default sort
    -----------------
    dev10
    dev215
    dev30

    Natural sort
    --------------------
    dev10
    dev30
    dev215

    How can I go about it?

    Thank you
    Rahul

    You can do within the db using the order by clause

    select * from xxxx order by to_number(regexp_substr(data, '[0-9]+'))
    

    XXXX is the name of your table and the data is the name of the column to sort.

    Timo

  • How a string in ascending order of sort

    Hello

    the samble of my sring as below,
    10; 2; 3; 4; 5; 8; 9; 1
    10; 2; 3; 4; 5; 8; 9
    and I need to sort in order to be as below, growing

    1; 2; 3; 4; 5; 8; 9; 10
    2; 3; 4; 5; 8; 9; 10
    any help please,.
    SQL> select * from sample_data
      2  /
    
    STR
    -----------------
    ;10;2;3;4;5;8;9;1
    ;10;2;3;4;5;8;9
    
    2 rows selected.
    
    select  ';' || rtrim(xmlagg(xmlelement(e,regexp_substr(str,'[^;]+',1,column_value),';').extract('//text()') order by to_number(regexp_substr(str,'[^;]+',1,column_value))),';')
      from  sample_data,
            table(
                  cast(
                       multiset(
                                select  level
                                  from  dual
                                  connect by level <= length(regexp_replace(str,'[^;]'))
                               )
                       as sys.OdciNumberList
                      )
                 )
      group by rowid
    /
    
    ';'||RTRIM(XMLAGG(XMLELEMENT(E,REGEXP_SUBSTR(STR,'[^;]+',1,COLUMN_VALUE),';').EX
    --------------------------------------------------------------------------------
    ;1;2;3;4;5;8;9;10
    ;2;3;4;5;8;9;10
    
    2 rows selected.
    
    SQL> 
    

    SY.

  • [CS3] Indexing, order of sorting and spaces

    Hello

    Can someone tell me if it is possible to get indexing in CS3 to treat space as a character important in terms of the sort order. An example:

    If I have two names, say Cilla Black and Tony Blackburn and the expressions 'Black and white', 'Black Mountain' and the word 'Black' I expect to find the entries in the order

    Black and white

    Black, Cilla

    Black Mountain

    Blackburn, Tony

    Blacken

    In other words '< space > black' comes before 'blacka"which in turn comes before"blackb"and so on.  I checked the indexes in a number of books and they do this kind of thing.

    In InDesign, the themes come from in order

    Black and white

    Blackburn, Tony

    Black, Cilla

    Blacken

    Black Mountain

    So it seems to be ignoring the comma and space as if sorting

    BlackAndWhite

    blackburntony

    blackcilla

    blacken

    Blackmountain

    Is it possible to stop it short of a few very specific sort key values (e.g. black1 black2, black3) which are highly likely to be broken if I add additional items to the index?

    Thank you.

    InDesign sorts its letter-by-letter indexes while you want is word for Word - for details, see http://www.kahrel.plus.com/indesign/sort.html

    Unfortunately, you cannot change this behavior in InDesign itself. But using the page sorter in this link, you can choose a strategy of the kind. This sorter, by the way, is a paragraph sorter, so if you have any subtopics that you would have to combine the topics and subtopics in a paragraph and then sort, then sous-sujets files. It is not ideal (and slow), but at least it gives you the desired result (or a very close, anyway).

    Peter

  • Combine the ORDER BY sorting columns?

    Hello-

    I wonder if this is possible:

    I would like to combine two columns of Dates (from separate tables) so that the SELECT result can be sorted (ORDER BY) based on the order of these TWO dates, not just one or the other.

    Wherever a date exists in a column, the other column contains a null entry. For example:

    ID-date1 - date2.
    0 - draw - 12/09/09
    1 08/04/09 - null.
    2 - null - 06/12/09
    3 08/12/09 - null.

    (forgive the formatting)

    Essentially, I want to leave null values and possess a solid column of dates to sort a SELECT with query. Is this possible? If so, how?

    The two date columns have type DATE - they are not strings. They also store sometimes, but I don't understand as in the illustration above for simplicity. The columns are two separate tables, but who are joined with a join internal based on an ID value that connects the two (not sure if it's too big).

    I am also open to any other ideas about how I could sort the results based on the two sets of dates; Looks like some kind of cartel would be the simplest or most logical (even if I'm wrong, because I can't find a way to do it).

    Thank you!

    Salvation;

    select tableA.id, nvl(tableA.date1, tableB.date2) as combined_dt
    from tableA, tableB
    where tableA.id=tableB.id
    order by 2
    

    Kind regards...

  • My firefox all got completely messed up

    My whole browser inexplicably got messed up.

    • Try to customize (topic: customization) does not work, click on the button of the horizontal line icon

      • gives a white on: Customizing page or
      • nothing happens.
    • Some of my modules appear active on the addons page but do not work in reality.
    • The home page that appears when I run firefox is now on: empty, although it shows my real homepage (topic: superstart) in the settings.
    • The button "Connect to synchronize" in my horizontal menu 3 lines suddenly disappeared.
    • It also appears as toggling of the modules is not really to work, because it doesn't tell me to restart firefox after trying to do so.

    And many other things. How can I get it back to normal? I really hope that I don't need to reinstall firefox (I don't want to reinstall all the addons and redo all the customization and all)! I haven't done anything that would cause the bug. I just change my Windows theme and test how firefox mixed with these themes. Got deformed appearance, hanged several times, for some reason, firefox so I restarted. And then suddenly all this happens.

    I really need help. Thanks in advance!

    Make a copy of the profile folder may be preferable if the third-party utility does not finish the book.

    In the case where one of your extensions is concerned, could test the page Firefox Safe Mode? It is a standard diagnostic tool to disable some advanced features of Firefox and extensions. More info: questions to troubleshoot Firefox in Safe Mode.

    You can restart Firefox in Mode safe mode using either:

    • button "3-bar" menu > "?" button > restart with disabled modules
    • Help menu > restart with disabled modules

    (Not all add-ons are disabled: Flash and other plugins still works)

    If these methods don't work, the release of Firefox, and hold down the SHIFT key when you start again.

    A small dialog box should appear. Click on 'Start mode safe' (not reset).

    Any difference?

  • Outlook 2003 will not deposit e-mails in chronological order - when sorted by date of files return in random order

    When accessing view / arrange by / day the mails in the kind of file, but when leave you and return emails are is more kept in chronological order

    Hello Operations1,

    Thanks for visiting the site of the community of Microsoft Windows XP. The question you have posted is related to Outlook 2003 and would be better suited to the Group Discussion Board community. Please visit the link below to find a community that will provide the support you want.
    General Outlook

    Steven
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think

  • My computer is completely messed up after installing the latest updates from Microsoft. I need help/ideas to make it work again.

    Vista Business Service Pack 2
    32 bit
    2007-12-office
    Acrobat 9 Pro
    Adobe Design Standard CS4
    Sony Vaio

    I installed the latest vista updates today.  Three "important"; an option.  The optional parameter was an update of bluetooth toshiba.  We were talking about "platforms" that made me uncomfortable so I went to Microsoft and after reading it, I decided - based on little understanding - it was probably necessary.
    Shortly after, Acrobat 9 Pro wasn't working anymore. The computer asked me to restart after installing updates, but I have done a couple of things, including some e-mail.  During the attempt to send e-mail until I turned off the computer, Outlook flash he has been restarted and then the icon to install flash and then I could come back and type until the sequence started.

    I turned off the computer and when I rebooted, it did not start.  I managed to get it started; I run scandisk; now, when it starts to get a series of errors from Adobe for various Adobe programs that I installed on the machine all seem related to the "Automatic Setup" (or boot, I don't remember exactly.  I tried to re - install Acrobat and I get an error message that the 'source' is not available, and to ensure that it is - despite me using the installation disc, so I guess that it refers to the 'source' in Vista.  Outlook does not start.  He told me to use scanpst.exe to analyze the .pst files, but they seem to have disappeared.  I have tried other products of office except Explorer who started without problem.

    I can't use restore because it says that the disc is damaged and needs to be checked.

    Any ideas are appreciated.

    Uninstall the update for bluetooth.  Never use Microsoft device driver updates.  To avoid this does not happen, you must disable automatic updates in Windows Update driver as follows: http://www.addictivetips.com/windows-tips/how-to-disable-automatic-driver-installation-in-windows-vista/.

    Go to start / all programs / accessories / command prompt and right click on command prompt, and then click Run as administrator.

    Type sfc/scannow, go and let it run.  It will scan and try to correct some of your system files.  If all goes well he comes complete with no corruption, it could not repair (if it has these post of corruption here or try to analyze it to find the problem or files using http://support.microsoft.com/kb/928228.

    While in the command prompt, type chkdsk /f /r and enter and let it run.  It will scan and try to solve any corruption or bad sectors on your hard drive and remove especially as a cause.  Who can release the OS to do a system restore or other recovery options.

    Do you know when this problem started (probably with updates)?  Try a system restore to a point in time BEFORE the problem started.  Here is the procedure: http://www.howtogeek.com/howto/windows-vista/using-windows-vista-system-restore/.  Don't forget to check the box to show more than 5 days of restore points.  If the first attempt fails, then try an earlier point or two.  NOTE: You will need to re - install any software and updates that you have installed between now and the restore point, but you can use Windows Update for updates.

    If the system restore does not work, do a startup repair, boot from the disk Installation of Windows Vista genuine (or one that you can borrow from someone) or a recovery disc.  Here is the procedure: http://www.bleepingcomputer.com/tutorials/tutorial148.html.  You may need to change the BIOS to do first the CD drive in the boot sequence to boot from the CD.  To do this, hold the screen that tells you the key F to push to enter the menu start or start of installation.  Push it quickly. Make the changes, save your work and exit.  Put the CD in the drive and reboot.  When you are prompted, press any key to boot from the CD.

    If you do not have a floppy disk, you can make a bootable recovery disk by using http://neosmart.net/blog/2008/windows-vista-recovery-disc-download/ with burning software like: http://www.snapfiles.com/get/active-isoburner.html and, of course, a blank CD.

    If this does not work, try to start in safe mode (repeatedly hit F8 key so that the start and go in safe mode with networking).  Then we will check some of your system files:

    If it does not, then thanks for posting any repetitive error message in Event Viewer on startup (Start / Control Panel / administrative tools / Event Viewer).  Here's how to use Event Viewer: http://www.bleepingcomputer.com/forums/topic40108.html.

    If this does not work, you will need to do a repair/system upgrade using the Windows Vista Installation disc authentic (you own or that you can borrow from someone).  Here is the procedure: http://www.vistax64.com/tutorials/88236-repair-install-vista.html as well as the upgrade from an earlier version of the Windows section of the following: http://support.microsoft.com/kb/918884.  Although this will not affect your data, settings or programs, you should always back up your data before you start just be on the safe side. If other procedures do not work, it is almost certain to work.  You can have a lot of updates to re - install (including all you need to remove service packs).  If the version on system with SP1 or SP2 preinstalled cane and the disc is an earlier version, then you will need to do a slipstream drive as follows: http://www.vistax64.com/tutorials/151606-vista-sp1-slipstream-installation-dvd.html.

    I hope one of these procedures can solve your problem.  If this isn't the case, after return and we will try something else.  Return message anyway so we know how it turns out.

    If none of these steps work, transfer your question in Forum Windows Update: http://social.answers.microsoft.com/Forums/en-US/vistawu/threads where the people who specialize in updating the questions will be more than happy to solve your problems.  Don't forget to tell them what updates you downloaded and installed, and what steps you have already done to try to solve the problem.

    Good luck!

    Lorien - a - MCSE/MCSA/network + / A +.

  • modify application order hangs after that complete restructuring (3.5hrs)


    Running batch or by steps manually, change application command fails after that complete restructuring.  Restructuring will run for 3.5 hours.

    Other alters, work very well on other applications if the retructure is running in like 1 hour.

    Essbase 11.1.2.4.000

    Below are steps to perform:

    MAXL > batchadmin login PASSWORD;

    MAXL > alter disable CONSOL application connects.

    MAXL > alter system disconnect session on application CONSOLE;

    MAXL > alter database CONSOL. CONSOL force restructuring;

    # Above works for about 3.5 hours

    MAXL > alter enable CONSOL application connects.

    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

    Above COMMAND FAILS and HANGS - must

    Restart Essbase

    These errors go to the screen in MAXL to reboot which is probably norman.

    ERROR - 1042016 - network error []: connection was closed...

    ERROR - 1042016 - network error []: connection was closed...

    There is also a timeout parameter in the EA.  Right mouse click on the name of the server under servers Essbase and choose the Edition command-> properties

    Then change the autodisconnect / limit of inactivity over the 210 minutes that takes your restructuring.  The default setting is 60.  I'd do this first, before you attempt to modify the time-out of the Regional service in my last answer.

    Good luck.

  • Text completely messed up on iPhone but not on the desktop browser

    Can someone tell me why my spacing of text is completely out of wack on my iPhone but if I find the layout of phone in Google Chrome on my laptop its fine. Even view the rendering of phone in dev tools in Chrome is fine.

    the site is http://GrillKingApp.com

    Any help is appreciated

    Thank you!

    The site looks good on other devices like Android and Windows, is only for the iPhone!

    Could you please try to remove all the files from the server hosting and reuploading your site?

    Also try to empty the cache of your phone's browser and check your site.

    -Catherine

  • Order re sort in stacked graphical view of Pivot table

    Hello

    I have a requirement in the order of the stack in a certain way, rather than alphabetical. In my criteria, I have a case statement affecting 1, 2 or 3 and directs this column. But what is the syntax to give me a prescription? Help, please. Thank you.

    Hi user

    Change the order of columns in the criteria. So will this order of column and it will show the battery view in this order.
    Don't forget to redraw the graph or the refreshment

    Thank you
    Don

Maybe you are looking for