Re: [HACKERS] ORDER BY Problem...

2001-06-06 Thread Trond Eivind Glomsrød

"Christopher Kings-Lynne" <[EMAIL PROTECTED]> writes:

> As far as I know, this is the standard (ASCII-ordered) way of sorting text.

No, it's the "we don't know anything about text, but we can compare
their numeric values" approach.  

-- 
Trond Eivind Glomsrød
Red Hat, Inc.

---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly



Re: [HACKERS] ORDER BY Problem...

2001-06-06 Thread Reinoud van Leeuwen

> Hello...
> 
> Why does Postgresql order the uppercase letters first?
> 
> I have e.g. a table with one row an in this row there are follow
> values:
> 
> row1
> 
> ADC
> aa
> ABC
> 
> With this select-syntax 
> 
> select * from table order by row1
> 
> I become this output
> 
> ABC
> ADC
> aa
> 
> but I want this ouptut:
> 
> aa
> ABC
> ADC
> 
> What do I wrong?

This will not solve your problem, but a way around this is to sort on upper
(row1):

# select * from test order by col1;
 col1
--
 ABCD
 AD
 Abc
(3 rows)

# select * from test order by upper(col1);
 col1
--
 Abc
 ABCD
 AD
(3 rows)



---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]



[HACKERS] ORDER BY Problem...

2001-06-06 Thread Severin Olloz

Hello...

Why does Postgresql order the uppercase letters first?

I have e.g. a table with one row an in this row there are follow values:

row1

ADC
aa
ABC

With this select-syntax 

select * from table order by row1

I become this output

ABC
ADC
aa

but I want this ouptut:

aa
ABC
ADC

What do I wrong?

-- 
Gruss: Severin Olloz

---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html