Click here to Skip to main content
15,894,180 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Need to update a table as depicted below :

table : master
---------------
idno
name
date1
comment1
date2
comment2
date3
comment3
date4
comment4

The program for the update should check if the field (date1) is empty and update it

if the system checks the field date1 and is not empty should check date2 and if its empty it should update it else it should move on to date3.

Please provide the program to update the table in the database.

Thanks

What I have tried:

Reviewed my programs and others but found no such solution
Posted
Updated 1-Jul-17 3:38am
v2

Quote:
Please provide the program to update the table in the database.

Wrong site.
If you need someone to do your job/work, hire a professional.
Hire Freelancers & Find Freelance Jobs Online - Freelancer[^]

Quote:
Reviewed my programs and others but found no such solution

As programmer, your job is to create algorithms that solve specific problems and you can't rely on someone else to eternally do it for you, so there is a time where you will have to learn how to. And the sooner, the better.
When you just ask for the solution, it is like trying to learn to drive a car by having someone else training.
Creating an algorithm is basically finding the maths and make necessary adaptation to fit your actual problem.

The idea of "development" is as the word suggests: "The systematic use of scientific and technical knowledge to meet specific objectives or requirements." BusinessDictionary.com[^]
That's not the same thing as "have a quick google and give up if I can't find exactly the right code".
 
Share this answer
 
Something like this:
SQL
UPDATE master SET [date1] = GETDATE() WHERE [date1] IS NULL
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900