[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Non-repeating results SQL statement

Posted on 2003-11-05
2
Medium Priority
?
364 Views
Last Modified: 2008-01-16
Hey guys,

I know, busy week for me on these boards right? Hehe...anyways.

SELECT pov
FROM TFCC_files
WHERE pov !='' AND pov!='some' AND pov!='some2' AND pov!='some3'
ORDER  BY pov ASC

And it gives me the results I want...well almost (hence the question).

Let's say that in my data there are multiple entries of the same type, so lets say there are 6 values for 'test'. How do I tell MySQL only to give me the unique ones? So instead of returning 6 results for 'test' it will return 1 unique result for 'test'. I need this because this will become a select box and it will look wierd if 'test' repeats itself 6 times.

Thanks in advance.
0
Comment
Question by:drakkarnoir
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 5

Accepted Solution

by:
arjanh earned 2000 total points
ID: 9689726
SELECT DISTINCT pov
FROM TFCC_files
WHERE pov !='' AND pov!='some' AND pov!='some2' AND pov!='some3'
ORDER  BY pov ASC
0
 

Author Comment

by:drakkarnoir
ID: 9691053
Thanks much! Was not aware of that SQL statement DISTINCT.

Rock on :)
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question