NET or some other language they can still use the sp's in the database and they can write their own business logic in the application from front end. the problem is that joining these two tables in the stored procedure. Client wants a functionality that when the user login we should provide an option as Benefit details in the portal.When the user clicks in he should be presented all the pdf links that he is eligible for.Then user clicks on any of the link he should be able to view that pdf.
To do it with a stored proc, your front end will need to call it and pass the values to the stored proc through parameters.
You would call it something like this exec Update2Tables 'INSERT',1,'2008-01-01','Test1','Test2','Image1',1,'STATE' I have given you a basic idea here.
I aslo need to provide the way to update these fields with the existing data at any time. You wouldn't normally use a stored procedure, although it certainly can be done.
I am new to storedprocedures and I am confusing in mapping these tables and populate them. Stored procs may or may not be your best choice A lot depends on what you are using as the front end for your users.
Not overly difficult but ck's suggestion is the better option by far. Here I am retrieving the pdf file based on identity column.
It is difficult to give you working queries for your particular question without having access to everything that you have access to. Yes I have to get the identity column from my application, from the stored proc and have to return that number to some other method. As for other error handling, you need to think of what could go wrong and try and cover it. Hi Delerna, I can upload the pdf file directly from the java application with out using the stored procedure.(using prepared statement in java) But the problem here is I can not get the identity column value to my application which I need to return it to another application.
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.
I am wondering how could I join these tables so that client can populate these tables.