List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:August 10 1999 4:28am
Subject:Re: Order By Problem
View as plain text  
At 12:10 PM -0500 8/10/99, Ping Lau wrote:
>I have a simple table POITEM looks like this:
>
>po char(10)
>itemno char(10)
>desc char(50)
>unitprice float(4)
>
>I have inserted 11 items against PO number 123.  The item numbers are 1, 2,
>3, 4, 5, 6, 7, 8, 9, 10, 1A.  I then tried to query PO 123,
>
>select * from poitem where po = "123" order by itemno
>
>But the result did not show item numbers in the correct order: 1, 10, 2, 3,
>4, 5, 6, 7, 8, 9,1A!  How can I force item number 10 to appear after 1A?


You're trying to sort strings as though they are numbers.

Why?

-- 
Paul DuBois, paul@stripped
Thread
Order By ProblemPing Lau10 Aug
  • Re: Order By ProblemPaul DuBois10 Aug
    • Re: Order By ProblemMartin Ramsch10 Aug
Re: Order By ProblemMagnus Hammar10 Aug
  • Reply-To (was: Order By Problem)Martin Ramsch10 Aug
  • Re: Order By Problem(Paul D. Smith)10 Aug
Re: Order By ProblemPing Lau10 Aug
  • Re: Order By ProblemRaghu Machepalli10 Aug
  • Re: Order By ProblemChristian Mack10 Aug
Re: Order By ProblemPing Lau11 Aug