Two Queries Inside One?

K

Kris

I want to perform two actions inside a query. I can do
this in SQL Server but I do not know how in Access. Can
someone shed some light on this? Here is what I would
like to do:

PARAMETERS recipe_name Text ( 255 ), index_dist
IEEESingle, rotation IEEESingle, edit_time DateTime,
username Text ( 255 );

SELECT Recipe.Curr_Index AS Old_Index,
Recipe.Curr_Rotation AS Old_Rot
FROM Recipe
WHERE Recipe.Name = @recipe_name;

UPDATE Recipe SET Recipe.Curr_Index = @index_dist,
Recipe.Curr_Rotation = @rotation,
Recipe.Prev_Index = Old_Index, Recipe.Prev_Rotation =
Old_Rot, Recipe.Edit_Time = @edit_time, Recipe.User_Name
= @username
WHERE Recipe.Name = @recipe_name;
 
V

Van T. Dinh

(answered in gettingstarted)

Please use cross-posting if you think it is necessary (which is rare) rather
than multi-posting.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top