I have a table with three columns: Day, Key, Value. If there is a value absent from the Key column, I want to be able to insert it:
DAY | KEY | VALUE
------------------
Mon Run 50
Mon Bike 20
Tues Run 25
Tues Bike 60
Wed Run 20
Wed Swim 5
I want to be able to identify the row with the missing ‘Bike’ value from the column and insert it. So there would be an additional row
Wed Bike 20
How should I go about achieving this?
Can you please try this? It’s the hard-coded approach:
Or if you can, please use stored procedures (which will allow you to choose the activity and value:
This way, you can perform the same action for any particular
"activity"(I’m just naming it that way, but I’m referring toRun,Bike,Swimor anything else)