On 18 Jan 2007 01:22:01 -0800, "Karthik D V"
<Ka************@gmail.comwrote:
>
Grzegorz Danowski wrote:
>"Karthik D V" <Ka************@gmail.comwrote in message
news:11*********************@l53g2000cwa.googlegr oups.com...
>
Hello All,
I have a table like this
ID CHARACTER
----------- ---------
1 A
2 A
3 B
4 B
5 C
6 D
7 D
I need result like this.
I need SQL query which will fetch the following result.
ID CHARACTER
----------- ---------
1 A
3 B
5 C
6 D
Answer to my question ASAP. I need it very badly.
Select
Min(T.Id) As Id,
CHARACTER
From
YourTable As T
Group By
CHARACTER
--
Regards
Grzegorz
Without using Group by clause.
??
SELECT 1 AS ID, 'A' AS CHARACTER
UNION ALL SELECT 3, 'B'
UNION ALL SELECT 5, 'C'
UNION ALL SELECT 6, 'D'
Though if you submit this I'm not sure you'll get a good mark...
This is also OT for this newsgroup. Try one of the SQL ones.
--
Philip Daniels