Build simple SQL Query
$10-30 USD
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.
Projekt ID: #16492394
Om projektet
19 freelancere byder i gennemsnit $34 timen for dette job
//** 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
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.
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.
Sir, I am ready to make the query right now. ..........................................................................................
Hello, there? Greetings. Here is strong experienced MySQL expert. Please contact me to solve it. Thanks
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
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
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
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
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