473,322 Members | 1,379 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,322 software developers and data experts.

fetch value without duplicate column

hi there, i need a help, it is very urgent.

i have table like

column1 column2
a a
a b
a b
a c
a d
a e

I need to fetch all column from this table, but duplicate columns will not be fetched.
that is, above table row 2 and 3 have duplicate values , so, row 2,3 will not be fetched.

any help, will be appreciated.

Neel
Dec 23 '10 #1
5 1934
Rabbit
12,516 Expert Mod 8TB
The DISTINCT keyword is what you're looking for
Dec 23 '10 #2
thnks for your reply. but i dont want to fetch both the rows who are duplicate. im my example row 2,3 are duplicate , so none of the rows 2,3 will be fetched. how do i proceed. pls help.
Dec 23 '10 #3
Rabbit
12,516 Expert Mod 8TB
Oh, in that case, do a group by on the 2 columns and filter out anything with a count greater than 1
Dec 23 '10 #4
can u give me an example, pls. i need it urgently.

warm Regards

Neel
Dec 23 '10 #5
THANKS I HAVE DONE THE QUERY,
IT IS
select * FROM TABLENAME GROUP BY COL1,COL2 HAVING(count(COL1)=1 )

THIS WORKS FINE FOR ME.
THANKS AGAIN

REGARDS
NEEL
Dec 23 '10 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Q. John Chen | last post by:
Using MySQL control center, I created a MySQL database table with a column of Date type. It always give the a Default value (0000-00-00) even null is allowed. I tried remove the default value and...
4
by: Johan Vervloet | last post by:
Does anybody know how I can change the default value for a column? I was trying to remove the default value in order to add the new one afterwards. This is what I tried: alter table...
3
by: Prabhudhas Peter | last post by:
I want to assign null value to a column in the database which is decalred as an integer from VB.net... Is there any specific keyword like vbNull as in vb 6.0. -- Peter...
1
by: Andy L | last post by:
I have two identical databases running on two separate servers. I want to add a column to the following table: classified_cats { acid , name , parent } Running ALTER TABLE `classified_cats`...
1
by: bbasberg | last post by:
Hi, I am wondering how to get a value from one column based on another, using visual basic for applications. Here are the criteria: The first column contains status and we want the next row in...
0
by: Greg Smith | last post by:
I would like to assign the value of a column to the text of the 'Select' column. i.e. In stead of 'Select' it would have the value in the column. Is this do-able? Any help is greatly...
0
by: Fredrik Lundh | last post by:
maurizio wrote: What kind of file is it? Did you pick numpy because you want to do matrix operations (beyond just finding a maximum value), or was it just the first thing you stumbled upon...
1
by: maurizio | last post by:
thank you for your answer actually i've to do some statistics (maximum,minimum,mean,standard deviation,....) of a file of data in which each column is a particular type of data. (the file is a tab...
4
by: rajesh kunwar | last post by:
how can retrive listbox1 to listbox2 without duplicate value
1
by: Octo Siburian | last post by:
I have been collecting data from ms.access database into a class object '_Get and put in data from database Fingerprint(RAS) into CPresensiFingerprint Public Function GetdbFingerprint() As...
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...
1
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...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.