Distinct Recordz?
Hi, Wish if some one could help me I have a table which contains name, tel, email
i need to import only records which have distinct email.
I do need need to import data of all three fields but only which has distinct email.
So need only records which have distinct email.
Please help .......
Select distinct email,.... from table
Select * from table group by email.
can you give an example, how you want the records. there are different meaning of your asking.
suppose a table is like this
id fEmail NAme
1 abcd tony
2 efg raj
3 abcd mike
4 efg dennis
what's your output?
if it is,
abcd
efg
then by the query "select distinct email from tablename" you can get the above result.
if your output is like 1person per 1 mail,
abcd tony
efg raj
then the query would be like this "select
Email,Name from emails e where Id=(select min(Id) from emails where Email=e.Email) "SELECT name, tel, email FROM (SELECT name, tel, email,
ROW_NUMBER() OVER(PARTITION BY email ORDER BY name) as rn
FROM emails) t
WHERE rn=1
- Storing French Characters to SQL data base
- New DataTable with same columns as another table.
- Need help
- ASP.net C# cross database compatabile engine
- update parameters default date
- Index was out of range. error please help
- sql not returning correct results?
- Need some SQL queries mostly asked in Interview
- StartsWith filter on 2 single quotes HELP
- Object storage
Rss Feed