Results 1 to 10 of 197

Thread: IT Professionals

Hybrid View

  1. #1
    Senior Member Senior Hubber kirukan's Avatar
    Join Date
    Nov 2004
    Location
    udal koodu
    Posts
    600
    Post Thanks / Like
    Quote Originally Posted by PARAMASHIVAN View Post
    Thanks, I think it is better to identify duplicates using this than the traditional "having count (0) > 1 " , right ?
    To me it depends if you just need a list traditional itself will work better if you are going to do further analysis then partition will help.Below is an example from supplier master to identify two different suppliers given same beneficiary name for payment.

    --With Partition
    WITH party as(
    SELECT ROW_NUMBER() OVER (PARTITION BY party_benfname
    ORDER BY ptyh_id DESC ) RN,party_benfname,ptyh_id
    FROM party_master)

    select * from party where party_benfname in(select party_benfname from party where RN>1)

    --Old style
    select party_benfname,Ptyh_id from party_master where party_benfname in(
    select party_benfname from party_master group by party_benfname having count(party_benfname)>1)

  2. Thanks PARAMASHIVAN thanked for this post
  3. # ADS
    Circuit advertisement
    Join Date
    Always
    Location
    Advertising world
    Posts
    Many
     

Similar Threads

  1. IT Professionals
    By Raghu in forum Miscellaneous Topics
    Replies: 206
    Last Post: 19th July 2007, 09:09 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •