User Profile

Collapse

Profile Sidebar

Collapse
Gayatree
Gayatree
Last Activity: Nov 13 '08, 05:22 PM
Joined: Nov 5 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Gayatree
    replied to Finding duplicates rows in a table
    Hello CK
    thank you for u r reply.

    I am looking for duplicate Id
    Is that possible?

    What I thought is, same person cannot have 2 different salaries
    so I wanted to check for dupliate id.
    Can u please help me.

    Thank you
    See more | Go to post

    Leave a comment:


  • Gayatree
    replied to Finding duplicates rows in a table
    Thank you for u r immediate reply.

    But i need to select all the fileds in the table.
    For that I got the query like

    Code:
    CREATE TABLE [dbo].[Employee] (
                [id] [int] NULL ,
                [name] [Varchar] (50) COLLATE Latin1_General_CI_AS NULL ,
                [salary] [Numeric](18, 2) NULL 
     ) ON [PRIMARY]
    
    Insert into employee values (1,'Ram', 1000.00)
    Insert
    ...
    See more | Go to post

    Leave a comment:


  • Gayatree
    replied to Finding duplicates rows in a table
    Hi Ck,
    Sorry for asking u the same question again.
    the query above which u suggested will return all the duplicates in a table
    But I want a select statement that will return only one duplicate.
    Can u please help me
    Thanks in advance
    See more | Go to post

    Leave a comment:


  • Gayatree
    replied to Finding duplicates rows in a table
    Thank you for u r immedaite answer.
    I will try creating trigger.

    In SSMS,when we right click on the table
    we will get options as script table as create to ...ect
    But for me alter to is disabled,what should I do to enable that.
    why will that be disabled when I have permissions to devlop in that box
    and even execute is disabled.

    Can u please help me

    Thank you in adv...
    See more | Go to post

    Leave a comment:


  • Gayatree
    replied to Finding duplicates rows in a table
    Sorry for troubling you again.
    I am loading the data using SSIS.
    If there r 2 duplicates only one should be loaded into the
    target table ,the remaining should go into another table.
    Is this possible in SSIS.

    Thank you for helping me and giving me all the above query's
    Thank you
    See more | Go to post

    Leave a comment:


  • Gayatree
    replied to Finding duplicates rows in a table
    YUP ,GOT U

    Thank u So much.
    See more | Go to post

    Leave a comment:


  • Gayatree
    replied to Finding duplicates rows in a table
    Hi CK
    Thank u for u r reply.
    The 2 query's which u have suggested r working well.
    But The count which both of them return should be the same.
    But I am getting 1000 more records with the first one.

    Next time when i post a query I will use tags

    Can u please help me
    If I am not clear with the question me please let me know
    Thank u in advance
    See more | Go to post

    Leave a comment:


  • Gayatree
    replied to Finding duplicates rows in a table
    Hi ck9663,
    Thank u for u r immediate reply.
    But when I run the below query

    select Col1 + + Col2
    from TableA
    group by Col1 + + Col2
    having(count(*) )>1

    I should get the duplicates .
    But the the duplicate which I got from the query which u suggested is
    different from the above qurey.
    Is the above query wrong?
    can u please help me
    Thanks in adva...
    See more | Go to post

    Leave a comment:


  • Gayatree
    started a topic Finding duplicates rows in a table

    Finding duplicates rows in a table

    I have to concatenate 2 colimns in a table and find duplicates in them.
    I already used the method
    select * from tableA a
    where (select count(*) from TableA b
    where acol1+ +col2 = b.col1+ +col2)>1
    But the performance is very bad.
    Data is also huge
    Can you help me
    Thanks in advance
    See more | Go to post
No activity results to display
Show More
Working...