Advertisement

05.10.2008 at 03:29PM PDT, ID: 23392125
[x]
Attachment Details

Problem with Select Distinct statement

Asked by mgmhicks in Microsoft Visual Basic.Net, .NET

I ran a survey and have information in a sql database.  I am running this syntax:

Select distinct q4 from myquestions.
I get
Likely
Very Likely
doubtful
Very Likely
Likely

I think I have leading or trailing characters in some of the rows in that column.  I have used rtrim and ltrim yet select distinct should only give me 3 answers.  The others look exactly identical but you know they cant be if they come up 2 times with select distinct.  How do I make sure they get cleaned up?

Start Free Trial
[+][-]05.10.2008 at 03:36PM PDT, ID: 21540776

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

Zones: Microsoft Visual Basic.Net, .NET
Sign Up Now!
Solution Provided By: DarrenD
Participating Experts: 3
Solution Grade: A
 
 
[+][-]05.10.2008 at 03:46PM PDT, ID: 21540811

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.

 
[+][-]05.10.2008 at 05:21PM PDT, ID: 21541018

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.

 
[+][-]05.10.2008 at 07:28PM PDT, ID: 21541276

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.

 
[+][-]05.10.2008 at 07:33PM PDT, ID: 21541290

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.

 
[+][-]05.10.2008 at 08:19PM PDT, ID: 21541359

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

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

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