Hi all,
I am having trouble to writing stored procedure to insert and update the 2 tables in sql server 2005. Here is my problem.
I have 2 tables with following columns.
TableName:BENEF IT_PDF
1)DOCUMENT_CK
2)EFFECTIVE_DAT E
3)PDF_FILE_NAME
4)PDF_DISPLAY_N AME
5)PDF_IMAGE
another TableName: PLAN_PDF
1)DOCUMENT_CK
2)PLAN_ID
3)STATE
Here document_ck is the identity column which is autogenerated and refer to the PLAN_PDF.
EFFECTIVE_DATE and PDF_FILE_NAME FORM THE UNIQUE INDEX.
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.PLAN_ID is unique in the table.
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 aslo need to provide the way to update these fields with the existing data at any time.
I am new to storedprocedure s and I am confusing in mapping these tables and populate them.
Please help me.
thanks
Srini
I am having trouble to writing stored procedure to insert and update the 2 tables in sql server 2005. Here is my problem.
I have 2 tables with following columns.
TableName:BENEF IT_PDF
1)DOCUMENT_CK
2)EFFECTIVE_DAT E
3)PDF_FILE_NAME
4)PDF_DISPLAY_N AME
5)PDF_IMAGE
another TableName: PLAN_PDF
1)DOCUMENT_CK
2)PLAN_ID
3)STATE
Here document_ck is the identity column which is autogenerated and refer to the PLAN_PDF.
EFFECTIVE_DATE and PDF_FILE_NAME FORM THE UNIQUE INDEX.
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.PLAN_ID is unique in the table.
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 aslo need to provide the way to update these fields with the existing data at any time.
I am new to storedprocedure s and I am confusing in mapping these tables and populate them.
Please help me.
thanks
Srini
Comment