GUYS Please help me to update this table because I really need to solve it as soon as possible cuz of work issues.
I have one table by two columns, 1st is COUPON and 2nd is ID. I want to see if in front of any ID is just written one value as COUPON, then the same ID updates by the same COUPON name as written in from of that. thanks in advance. HOW CAN I WRITE THAT QUERY....???
ORIGINAL AND WRONG TABLE is like
-------------------
ID-----COUPON
----------------
1------ NULL
1------ NULL
1----- AGRI20
2----- -NULL
2----- AGRI10
3 ----- NULL
3------ NULL
3------ AGRI30
EXPECTED RESULT is like:
-------------------
ID-----COUPON
----------------
1------ AGRI20
1------ AGRI20
1----- AGRI20
2----- -AGRI10
2----- AGRI10
3 ----- AGRI30
3------ AGRI30
3------ AGRI30