• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Updating duplicate rows

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Guys i am facing a problem updating all but one duplicate rows. If i have 0 duplicate record in my table i should update 9 records and leave the other record as it is. For example

if i have the following records

Id Fname Lname
1 abc xyz
2 abc xyz
3 abc xyz
4 abc xyz
5 abc xyz
6 abc xyz
7 abc xyz
8 abc xyz
9 abc xyz
10 abc xyz



after i run the query the result should be some thing like this

Id Fname Lname
1 abc xyz
2 abc xyz_1
3 abc xyz_2
4 abc xyz_3
5 abc xyz_4
6 abc xyz_5
7 abc xyz_6
8 abc xyz_7
9 abc xyz_8
10 abc xyz_9



 
juniad Ahmed
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Its 10 record not 0
 
Why should I lose weight? They make bigger overalls. And they sure don't make overalls for tiny ads:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic