Database Web Apps
Queries Cursors Views
Writing Logic Queries
Dynamic SQL Statements
Retrieving Data Multiple Tables
Multiple Table Retrieval
Alternate Queries Aliases
Inserting Data Transact SQL
SQL Statement Punctuation
Inserting Values from another Table
Updating Values from differentr Table
Indexing Query Strategies
Full Text Searching
Defining Full Text Indexes
Implement Full Text Search
Updating Data from Values in Another Table - Exercise
Create an UPDATE statement using values from another table
Practice creating an UPDATE statement using values from another table.
This exercise is worth a total of 20 points. You will receive up to 20 points for accurately creating the UPDATE statement as described in the instructions.
Using the course project as an example, the Timesheets table looks like this:
The Tasks table looks like this:
The company realized that for the week ending 6/1/2009, employee number 1 inadvertently charged 30 hours of vacation on his timesheet, but he should have charged 40 hours. Assuming that you do not know the TaskID for Vacation, Construct an UPDATE statement that uses both tables to update the Hours column in the Timesheets table to the appropriate value.
Submitting the exercise
Type or paste your Transact-SQL statement into the text box below, then click
to submit them and view a results page.