Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


create sp to update foreign key identity columns

create sp to update foreign key identity columns

create sp to update foreign key identity columns

I am trying to create a stored procedure that I can call when I have completed data entry for the assessments that occurred for a patient at a visit.  I want the stored procedure to update the tbl_Patient_Visit with the FK identity columns found in each assessment table.  

Thus far I have something like...
Create Procedure (update_Patient_Visit)
(@v_id  [int],
 @testa  [int],
 @testb [int])

AS UPDATE [database].[dbo].[Patient_Visit)


WHERE v_id = v_id


I know there are considerable errors, especially since I wish to specify that the tbl_patient_visit.v_id = tbl_testa.v_id.

Any guidance would he extremely helpful. Thank you!!

RE: create sp to update foreign key identity columns

Please disregard this post, I have read a few other postings which explained how update queries work with .adp databases and I think that update queries will be the best way to accomplish the task.  Thank you!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close