none
[UWP][SQL] How to use Order by command from query with SQL? RRS feed

  • Question

  • Hi.

    I'm Jack.

    I tried use SQL query command in UWP with SQLite class.

    But I can't use Order by command.

    My command as below.

    "select * from ManageItems where StoreName ='ED-8F-AC-EB-AA-A8'and StoreSubName Like'EC-86-8C-ED-94-84%' and CreationDate ='20170516' Order by StoreSubName, ProductName"

    this command is not work for the Order by.  

    If you know that, please let me know.

    Thanks.

    Jack.

    Monday, July 10, 2017 1:48 AM

Answers

All replies

  • Hello Jack,

    "Does not work" means what exactly? Are you getting an error message or ... ?


    Olaf Helper

    [ Blog] [ Xing] [ MVP]

    Monday, July 10, 2017 5:34 AM
    Moderator
  • Hi Olaf.

    No.

    "Does not work" means as not work the "Order by".

    This means happend same results as below by both query.

    1. query

    "select * from ManageItems where StoreName ='ED-8F-AC-EB-AA-A8'and StoreSubName Like'EC-86-8C-ED-94-84%' and CreationDate ='20170516'"

    2. query

    "select * from ManageItems where StoreName ='ED-8F-AC-EB-AA-A8'and StoreSubName Like'EC-86-8C-ED-94-84%' and CreationDate ='20170516' Order by StoreSubName, ProductName"

    Your understand?

    Jack.

    Monday, July 10, 2017 5:49 AM
  • And where do you verify the result? Is it possible, that the frontend performs an additional sort?

    Olaf Helper

    [ Blog] [ Xing] [ MVP]

    Monday, July 10, 2017 5:52 AM
    Moderator
  • This is my the Windows 10 Mobile 's Application with UWP and SQLite Class.
    Monday, July 10, 2017 6:00 AM
  • This issue is my mistake.

    resolved.

    • Marked as answer by jack.hong Monday, July 10, 2017 6:51 AM
    Monday, July 10, 2017 6:51 AM