Example: Effect of the ASCII Collation Sequence on SQL Report Output - Analytics Database - Teradata Vantage

SQL Data Definition Language Syntax and Examples

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2024-10-04
dita:mapPath
jco1628111346878.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
mdr1472255012272
lifecycle
latest
Product Category
Teradata Vantage™

The session collation is set to ASCII. Assuming that job_rept contains alphanumeric data, a SELECT that requests a sorted return, as follows.

     SELECT emp_no, jobid 
     FROM job_rept 
     ORDER BY job_id;

This request produces the following report, sorting job_id in ascending order.

     EmpNo       JobId
     ------    --------
     10201      1001-AP2
     10201      1032-AR3
     10201      1031-AR2
     10004      ENG-0002
     10016      ENG-0002
     10004      ENG-0003
     10003      OE1-0001
     10001      PAY-0002