Is there a way to set a variable from a select query and then use it in a update query in the same procedure. I derive a value "avgwagerate" in a select statement which uses a caluculation to get this value. I now want this value put into another table using an update command. Can anyone help me.