Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

UPDATE or..problem

Status
Not open for further replies.

edwardsal

Technical User
Nov 3, 2006
13
I have in table 2 rows with same record

field 1, field 2, field 3, field 4
_______________________________________
salcin, elva, 23, 0
salcin, elva, 0, 45


so how can I update or... to have only one row with record like
field 1, field 2, field 3, field 4
_________________________________________
salcin, elva, 23, 45

 
First of all, those 2 rows aren't the same. The fact that there are different values for fields 3 and 4 make them unique. So the question I would ask myself is why is the data this way in the first place? Is there a valid reason? If so, what is it? But what you're suggesting would violate the integrity of your database and make it pretty much useless. I mean, how would you know which of the two rows to update? What happens if you update the wrong one? Is your question more along the lines of how can you write a query to give you one row in the results?
 
>how can you write a query to give you one row in the results

Yes doesnt matter which one I need just to get one row like I write :
Instead:
salcin, elva, 23, 0
salcin, elva, 0, 45

Get:

salcin, elva, 23, 45

so where is 0 to be value from first/seconde row

Thx
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top