Build simple SQL Query

I gang Opslået 6 år siden Betalt ved levering
I gang Betalt ved levering

I need some help builing an UPDATE sentence which changes some contents of the rows, based on another row.

I want to set Property2 to 1800 from 2 rows which are similar to ID 2 (Sam), being similar means having same Property1.

In this case I would change it for ID2 (Sam) and ID4(Jay), since ID1 already is 1800, ID3 have different property, and ID5 could be changed, however I already changed 2 rows.

ID....Name....Property1....Property2....

1.....Bob........0...........1800.......

2.....Sam........0.............0........

3.....Ted........2.............0........

4.....Jay........0.............0........

5.....Eli........0.............0........

The result desired is this one:

ID....Name....Property1....Property2....

1.....Bob........0...........1800.......

2.....Sam........0...........1800.......

3.....Ted........2.............0........

4.....Jay........0...........1800.......

5.....Eli........0.............0........

I was thinking something like this:

UPDATE table SET Property2=1800 WHERE (Something) LIMIT 2.

Could you please help me building this query? I need it right now.

MySQL SQL

Projekt ID: #16492394

Om projektet

19 bud Remote projekt Aktiv 6 år siden

19 freelancere byder i gennemsnit $34 timen for dette job

riteshjain009

//** READY TO START RIGHT AWAY **// More then 5+ years of experience in Development . Also kindly check our profile we have done over 250 project here on freelancer so very much reliable & fit for your project . Flere

$30 USD in 0 dage
(168 bedømmelser)
7.4
uhjk

hello, #2 and #5 seems similar why #5 doesn't have a value of 1800 in the example you wrote? if you explain, I can send you query. ps: ops sorry, since limit is 2 it doesn't have to change. just realized.

$25 USD på 1 dag
(389 bedømmelser)
7.4
denizb16

Hello, I can build an update query for you in a short while. I have 10+ years PHP, CSS/HTML, JavaScript and MySQL experience. Please send me a message to discuss the details. I am ready to start. Thank you.

$25 USD in 0 dage
(36 bedømmelser)
6.6
WebInfoSolutions

Sir, I am ready to make the query right now. ..........................................................................................

$15 USD in 0 dage
(86 bedømmelser)
6.9
sunnysmile911

Hello, there? Greetings. Here is strong experienced MySQL expert. Please contact me to solve it. Thanks

$35 USD på 1 dag
(10 bedømmelser)
6.1
hamidejaz024

Hello Hope you are good sir. Sir i'm sure i can build query for you. I have read your requirements so let's start work without wasting any time. Thanks

$15 USD på 1 dag
(46 bedømmelser)
5.4
syncwellpvt

Hello dear, I hope this proposal find you well, I saw your job posting online, I would like to request you please have a look into my previous works. I am a full-time freelancer with over 5 years of vast experience i Flere

$250 USD in 3 dage
(35 bedømmelser)
3.8
sandip101

Hi Good Day to you I have read your project brief. please discuss with us. ready to work right now We also provide a 24/7 customer care service. Looking forward to your consideration

$14 USD på 1 dag
(2 bedømmelser)
0.9
MeghaGFreelancer

Give me a chance to fix it. I will never make u feel discouraged.

$16 USD på 1 dag
(0 bedømmelser)
0.0
vw8000414vw

I have 7 years of sql development experience and handles complex projects and database of size 50 Tb. Relevant Skills and Experience We can provide screenshot and query analyzer techniques to help you further

$25 USD på 1 dag
(0 bedømmelser)
0.0
Banjella

You will have to fetch the determinant row and use a condition to set the target row. I am Banji...I can write functions that will do all those... Chat me up and fill me in on more info

$25 USD på 1 dag
(1 bedømmelse)
0.0
uabdulaleem

A proposal has not yet been provided

$15 USD på 1 dag
(0 bedømmelser)
0.0