Updating multiple tables in sql server
As I said Stored proc may not be the best way, it depends on a lot of things?
Depending on your front end it may not even be possible to use a stored proc for this. Hi Delerna, I just confirmed with my team lead that we should make use of the stored procedure, Because the font end we are using is JAVA right now.
The SQL Server (Transact-SQL) UPDATE statement is used to update existing records in a table in a SQL Server database.
Then you can put the working pieces back together into the larger task, knowing that that smaller piece is working. Now to the problem of inserting extra records into the PLAN_PDF table.Hi Delerna, If I do not use the stored procedure, I need to update these tables through my application right? We are just creating a helper class in java(which make use of these sp's in the database and call them) and giving it to the other vendor who can actually make use of that code.If so I need to join these 2 tables and do the insert/update from my application. Like I mentioned more than one state can have the same benefit details. In the future if the client want to implement this service class with another .The first table stores the benefit detais as pdf file.(in the PDF_IMAGE column) more than one state is associate with the benefitdetails.(thts why we have plan_pdf table) like 2 states can have the same benefit details. I need to provide a way to the client that he can able to populate these 2 tables through stored procedures.i am wondering that should I write a single sp to do this or I need 2 sp's to acomplish this task.