Re: SELECT . . . ORDER BY - SQL 2000 vs. JET 4
From: Frank (fnoell_cisi_at_hotmail.com)
Date: 07/12/04
- Next message: David Portas: "Re: Decrypt SQL Proc"
- Previous message: Nitin Rana: "drop sql login and related database users altogether"
- In reply to: Steve Kass: "Re: SELECT . . . ORDER BY - SQL 2000 vs. JET 4"
- Next in thread: Steve Kass: "Re: SELECT . . . ORDER BY - SQL 2000 vs. JET 4"
- Reply: Steve Kass: "Re: SELECT . . . ORDER BY - SQL 2000 vs. JET 4"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 12 Jul 2004 16:04:06 -0700
Gee... Magic! Now I have to remove all of my bubble sort code (all 17
lines).
Thank you for the "clean" way to handle this!
Note. I've been programming for 34 years, and every time I start using
something new (to me), or sit at a new operating system, it's "newbie" time
all over. Thank goodness there are people like you to help! Much of the
stuff that I have become a "guru" on is hardly, if at all, used. You gotta
keep marching on.....
Frank
"Steve Kass" <skass@drew.edu> wrote in message
news:eEgSpq6ZEHA.4032@TK2MSFTNGP11.phx.gbl...
> Frank,
>
> As in my example, you can add
>
> collate Latin1_General_CI_AI
>
> in the ORDER BY clause to change the sort order. You can also declare
> table columns with that same COLLATE clause (though I used the "wrong"
> one below to imitate what is probably going on for you). If you declare
> the table columns with COLLATE, then any indexes built on those columns
> will respect the collation and can be used to optimize your queries. If
> you do this, you do not need COLLATE in the ORDER BY clause. You can
> also change the default collation for an entire database, which will
> affect the collation applied to newly-declared tables:
>
> ALTER DATABASE yourDatabase COLLATE Latin1_General_CI_AI
>
> You can also specify the collation for an entire instance of SQL Server,
> but only when the instance is first installed. If the instance
> collation is different from the one for your database or particular
> columns, the "wrong" collation will still be used for temporary tables
> (unless you specify otherwise) and perhaps in other places that could
> have an effect on performance.
>
> SK
- Next message: David Portas: "Re: Decrypt SQL Proc"
- Previous message: Nitin Rana: "drop sql login and related database users altogether"
- In reply to: Steve Kass: "Re: SELECT . . . ORDER BY - SQL 2000 vs. JET 4"
- Next in thread: Steve Kass: "Re: SELECT . . . ORDER BY - SQL 2000 vs. JET 4"
- Reply: Steve Kass: "Re: SELECT . . . ORDER BY - SQL 2000 vs. JET 4"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|