Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Impala order by clause is giving me results in a different way (Please see below)

Impala order by clause is giving me results in a different way (Please see below)

New Contributor

Impala order by asc clause is giving me results in a different way (Please see below)

1

10

2

3

4

5

6

7

8

9

 

I want results to be in numeric ascending order. How to fix this?

2 REPLIES 2

Re: Impala order by clause is giving me results in a different way (Please see below)

Rising Star

What type is the column you are ordering on? It looks like it's text, since the order you have is lexicographic. Try ORDER BY CAST(col AS INT).

 

Henry

Highlighted

Re: Impala order by clause is giving me results in a different way (Please see below)

New Contributor

Yes! sorry later realized its a string column..thanks!

Don't have an account?
Coming from Hortonworks? Activate your account here