jigsaw1975
07-18-2003, 07:04 AM
I have never really understood passing parameters and when to use a function to do so and when to use a procedure. Can someone please help me out.
SUMMARY: I have 2 company records. I need to pass a boolean value from one company record to the other. How do I do that?
DETAIL:
In my database, I am dealing with several thousands of companies, some of which are duplicates obviously. I am implementing a function which assists in the consolidation (deletion) of the unwanted or duplicate company records.
A user opens up a company record (for eg. Company 1), within that there is a "Consolidation field" (where the user can select another company record (company 2) - the one he wishes to delete). Then clicks save. Then my internal processing deletes the company saved in the Consolidation field (2) and keeps the one he had actually opened up (1).
All the company records may or may not be attached to several plans. What I need to do is check if Company 2 was attached to any plans or not and then pass this information to Company 1. I know I can have a boolean which checks whether it is attached to a plan or not. I have this coded..I know how to check for that..now I have a 0 or 1 value depending on whether the company is attached to plans or not but I don't know where to store this value and how to send it to Company 1. Also, do I use procedures or functions to do so.
Need help urgently and desperately.
SUMMARY: I have 2 company records. I need to pass a boolean value from one company record to the other. How do I do that?
DETAIL:
In my database, I am dealing with several thousands of companies, some of which are duplicates obviously. I am implementing a function which assists in the consolidation (deletion) of the unwanted or duplicate company records.
A user opens up a company record (for eg. Company 1), within that there is a "Consolidation field" (where the user can select another company record (company 2) - the one he wishes to delete). Then clicks save. Then my internal processing deletes the company saved in the Consolidation field (2) and keeps the one he had actually opened up (1).
All the company records may or may not be attached to several plans. What I need to do is check if Company 2 was attached to any plans or not and then pass this information to Company 1. I know I can have a boolean which checks whether it is attached to a plan or not. I have this coded..I know how to check for that..now I have a 0 or 1 value depending on whether the company is attached to plans or not but I don't know where to store this value and how to send it to Company 1. Also, do I use procedures or functions to do so.
Need help urgently and desperately.