Note that there are some explanatory texts on larger screens.

plurals
  1. POSQL Sorting using Order by
    primarykey
    data
    text
    <p>Can you all please help me with this? </p> <p>Presently, I have this SELECT which returns data ordered by this way</p> <pre><code>SELECT DISTINCT gl.group_id, gl.group_name, gl.group_description, gl.status_code, gl.member_count, ( SELECT grpp.group_name FROM test_group_relationship grel JOIN test_group grpp ON grel.parent_group_id = grpp.group_id WHERE grel.child_group_id = gl.group_id ) AS parent_group_name, gl.group_name_key, gl.group_description_key FROM test_group gl WHERE gl.group_org_id = '3909' AND gl.group_name_key like '%' || 'GROUP' || '%' ORDER BY gl.group_name_key, CONVERT(gl.group_name, 'WE8EBCDIC500') </code></pre> <p>The output is below.I have tried indenting the columns to paste the data.</p> <pre><code>GROUP_NAME GROUP_NAME_KEY Add Group Basic Flow ADD GROUP BASIC FLOW Administrative Group ADMINISTRATIVE GROUP Amy Group 33 AMY GROUP 33 Amy Test Group 1 AMY TEST GROUP 1 another add group test from matt ANOTHER ADD GROUP TEST FROM MATT </code></pre> <p>**My Question is in the FIELD GROUP_NAME--> how can i SORT DATA using ORDER BY so that lowercase letters will be sorted before uppercase letters.</p> <p>Expected output is :-</p> <p>the value "another add group test from matt" has to come at the first place.This way lowercase letters are sorted first and then UPPER CASE.</p> <hr> <p>See also:</p> <ul> <li><a href="https://stackoverflow.com/questions/805568/sql-order-by-issue-continued-please-help/807323">SQL ORDER BY Issue Continued</a></li> <li><a href="https://stackoverflow.com/questions/804110/plsql-order-by-issue">PLSQL ORDER BY Issue</a></li> </ul>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload