Advertisement

09.12.2003 at 03:28AM PDT, ID: 20736815
[x]
Attachment Details

ORDER BY items must appear in the select list if SELECT DISTINCT is specified.

Asked by mrstevie in MS SQL Server

Tags: must, appear, items, distinct, order

How can I make this query work. The lower(name_cat) appears to be cauing the problem. I tried moving it to distinct lower(name_cat) but that gave the same error.

select
  distinct name_cat
from
  category
where
  user_id = '73'
order by
  lower(name_cat) asc

How can I make this query output the correct information which is a case-insensitive sort order.

eg...

Barry
Ben
bill
Bob

not

bill
Barry
Ben
Bob
Start Free Trial
 
Keywords: ORDER BY items must appear in the se…
 
Loading Advertisement...
 
[+][-]09.12.2003 at 04:29AM PDT, ID: 9345004

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.12.2003 at 04:30AM PDT, ID: 9345008

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.12.2003 at 04:40AM PDT, ID: 9345055

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.12.2003 at 05:03AM PDT, ID: 9345149

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.12.2003 at 05:10AM PDT, ID: 9345177

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.12.2003 at 05:29AM PDT, ID: 9345285

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.12.2003 at 05:37AM PDT, ID: 9345338

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.12.2003 at 06:07AM PDT, ID: 9345545

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: MS SQL Server
Tags: must, appear, items, distinct, order
Sign Up Now!
Solution Provided By: ErnMalley
Participating Experts: 4
Solution Grade: A
 
 
[+][-]09.12.2003 at 06:12AM PDT, ID: 9345578

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32