If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Unanswered: SQL Exam Updates?????

Hello, Yesterday I asked... "My company have created a website where employees will be able to take a test to earn points (CPD hours) which will be updated every time an employee takes the test. I am trying to find a way to update the number of CPD hours each employee has earned by using SQL, and displaying this on their profile page. The number of CPD hours awarded will need to be updated every time they earn more points. Every time they take the test, 2 CPD hours will be added."

We have created the tables for this, but when loading the page, an error occurs. This is what we have at the minute,

I don't know what CPD_Hours is but if its an actual time then you should be using a date time variable to store the value and using appropriate date time functions to manipulate the values. if its elapsed hours then its probably fine

incidentally I'd strongly recommend that you assign the value of your SQL to a variable before sending it to the SQL engine or the object handling hte SQL action. why?
becuase it makes debugging the SQL much easier. you can examine the SQL being sent as opposed to guessing what is is sent

if you get an error message its realtively easy to debug the SQL. bear in mind not only are you trying to check for compilation errors and logic errod int he code but the same things in your SQL. however SQL errors will not be reported so easily as code errors in the IDE