473,240 Members | 1,907 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,240 software developers and data experts.

Reducing like returned data

I am working on a personal project and am drawing a complete blank
(too much celebrating last night?) on the SQL term that is used to
eliminate multiples of like data when it is returned from the
database.

ie, instead of ....
red
blue
red
green

it would return ...
red
blue
green

Sorry for the trouble and thanks.
Jul 20 '05 #1
2 1117
DISTINCT or GROUP BY will do that for you.

Example:

SELECT DISTINCT colour
FROM ColourTable

--
David Portas
------------
Please reply only to the newsgroup
--
Jul 20 '05 #2
Thanks, David!

On Thu, 1 Jan 2004 23:47:08 -0000, "David Portas"
<RE****************************@acm.org> wrote:
DISTINCT or GROUP BY will do that for you.

Example:

SELECT DISTINCT colour
FROM ColourTable

--
David Portas
------------
Please reply only to the newsgroup


Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: lawrence | last post by:
I had some code that worked fine for several weeks, and then yesterday it stopped working. I'm not sure what I did. Nor can I make out why it isn't working. I'm running a query that should return 3...
0
by: Juan | last post by:
When populating a dataset I get an error if the data being retrieved includes a string field with a Null value: "Not valid store type: DBNull". What kinf of data type can i define in the dataset to...
10
by: Tony | last post by:
I'm wondering if anyone has run any tests to compare the speed of parsing XML vs text in simple lists - such as: <?xml version="1.0" encoding="ISO-8859-1"?> <users> <user>User 1</user>...
2
by: Ian | last post by:
Hiya, Hope this isn't too stupid a question :) I can bind an objectdatasource to a gridview very easily (and there's a thousand tutorials of this on the net). BUT! I just want to get at...
7
by: Jonas Stein | last post by:
i want to write an gui (an applet for Kicker in KDE) for a shellcommand in qt3/c++. So i need to call an executable and get its output back into my c++ program. what would be the correct way...
3
by: boliches | last post by:
I am trying to display data using SELECT on "Form Open" to text boxes, but am failing! ie: Data = "SELECT * FROM tblInvoice" Combo1 = Combo1.RowSource = Data Combo1 = Combo1.ItemData(0) Text2...
3
by: Annyka | last post by:
Platform: SQL Server 2000 (8.00.2040, SP4, Enterprise edition) I've got a complex query I'm trying to build, which will select all requests that have a status_code of 1, and who's related incident...
3
by: Gary W. Smith | last post by:
I had a couple questions about data caching. We have a site that gets a huge amount of traffic to a few specific pages that have a lot of data on them (300k hits/hour during peak, about 6-10 data...
5
by: mandanarchi | last post by:
Bit of a toughie here I think. I use (access 2003) HTTP.send function to open up a php file that's stored on an internal website. The file queries one of our suppliers regarding stock (with xml...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.