The sum of all SQL Server matter that exist,
and the space in which all SQL Server events
occur or could occur.
Welcome to SQL Server Universe.com Sign in | Join | Help
Home SS SLUG Forums Articles Photos Downloads

Query request

  •  05-07-2008, 10:44

    Query request

    DECLARE @TABLE TABLE
    (
        EmpID CHAR(3)
        ,Category CHAR(1)
    )

    INSERT INTO @TABLE VALUES('101','A')
    INSERT INTO @TABLE VALUES('102','B')
    INSERT INTO @TABLE VALUES('103','C')
    INSERT INTO @TABLE VALUES('104','A')
    INSERT INTO @TABLE VALUES('105','B')
    INSERT INTO @TABLE VALUES('106','C')
    INSERT INTO @TABLE VALUES('107','D')
    INSERT INTO @TABLE VALUES('108','A')
    INSERT INTO @TABLE VALUES('109','A')
    INSERT INTO @TABLE VALUES('110','D')

    I need to remove record from each duplicated values in [Category] field.
    Ex : One record from each A,B,C and D. Any Idea?
     

    Filed under:
View Complete Thread

(Best viewed with a resolution of more than 1024 * 768)

Powered by Community Server, by Telligent Systems