Results 1 to 5 of 5

Thread: [RESOLVED] [2005] Duplicate Rows sqlexpress

  1. #1

    Thread Starter
    Hyperactive Member gooden's Avatar
    Join Date
    Dec 2006
    Location
    Portugal
    Posts
    274

    Resolved [RESOLVED] [2005] Duplicate Rows sqlexpress

    do you guys know any command sql or by .net that duplicate rows only editing some values?

    Glad if you could help =)


    The Future Is Always The Way To Live The Life

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: [2005] Duplicate Rows sqlexpress

    Do you mean that you have two or more completely identical rows in your database table, and you only want to edit one of them?

    If so, that isn't really possible, and is a sign of bad database design.. the best you can do is modify the table so that it has a unique key, or move the data around around a bit to eliminate duplicates. Neither of these are options to be used in your program, they are both manual changes to the database itself.

  3. #3

    Thread Starter
    Hyperactive Member gooden's Avatar
    Join Date
    Dec 2006
    Location
    Portugal
    Posts
    274

    Re: [2005] Duplicate Rows sqlexpress

    Quote Originally Posted by si_the_geek
    Do you mean that you have two or more completely identical rows in your database table, and you only want to edit one of them?

    If so, that isn't really possible, and is a sign of bad database design.. the best you can do is modify the table so that it has a unique key, or move the data around around a bit to eliminate duplicates. Neither of these are options to be used in your program, they are both manual changes to the database itself.
    Well the problem is that the row that i want to duplicate is called a document and is going to transform it to other tipe of documento.
    SO i have for example a document like:
    |Doc1|tipe1|

    and i want to make a copy like:
    |Doc1|tipe2|


    The Future Is Always The Way To Live The Life

  4. #4
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: [2005] Duplicate Rows sqlexpress

    OK, well in that case we are going to need more info, such as:

    How do you know which record you want to copy?
    How do you know what 'changes' you want to make?
    What code do you have already, if any?
    ...

  5. #5

    Thread Starter
    Hyperactive Member gooden's Avatar
    Join Date
    Dec 2006
    Location
    Portugal
    Posts
    274

    Re: [2005] Duplicate Rows sqlexpress

    si_the_geek thanks for the help but the thing i whant to do is more complicated. i discovered that now :S well i need to make some selects and joins and select inside select :| anyway ty for the help


    The Future Is Always The Way To Live The Life

Posting Permissions

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



Click Here to Expand Forum to Full Width