jayasree_tella@yahoo.com
Starting Member
2 Posts |
Posted - 2008-03-12 : 09:35:17
|
Hi I am New to Sql Server. Now i have to write two stored procedures.Here are my requirements. If any one help please.1)People often ask me to do this as well... change the name of the underwriter. For Mortgage Network underwriters (different than MGIC underwriters) all you need to do is: Update mnetwork..unw_Nola set underwriter='<underwriters username>' where LoanID='<LoanID>' So, I need you to write a stored procedure that will do exactly that. If you don't enter a loanID or username, the stored procedure should tell you that it can't complete the task and why. Also, the list of underwriters can be found in: select LoginName from mnetwork..unw_LoginLookup where UnderwriterName = '<Name on the email>' So for this one, you would select where underwriterName='John Brennan'. For most usernames, it's just first initial last name (jbrennan in this case). You can make the stored procedure to both, if you want. If you enter an underwriter name, then it will translate to the loginname. If you enter the login name, it will just use that. You don't have to do all of that if you don't want. Just make sure the procedure verifies that the username is correct (in the table) and that is enough. Tables for this storedprocedure:Table Name:mnetwork..unw_NolaTable Fields:LoanID,ConditionSet,Status,Revised,RevisedBy,PDFNOLA,MonthlyIncome,DocExpDate,Notes, Underwriter,rowguid,ApprovedDate.MovedToCentera,FK_UserID,RecordDate TablName:mnetwork..unw_LoginLookupTable Fields: [LoginLookupID], [LoginName], [UnderwriterName], [FirstName], [LastName], [Title], [Signature], [Address1], [Address2], [Addr1], [Addr2], [City], [State], [Zip], [Phone], [Phone2], [Fax], [Email], [DefaultSet], [rowguid], [FK_UserID], [RecordDate], [Createdby], [LastUpdated], [UpdatedBy]2)1. Block this loan2. Grant me access to this blocked loan.So, I need you to write either one or two stored procedures that will accomplish the following:When a loan needs to be blocked, it needs to be added to the mnetwork..sec_BlockedLoans tableWhen a person needs access to that loan, their username needs to be added to the mnetwork..sec_LoanAccess table.Tables: 1) SELECT [LoanID], [Username], [Grantor], [GrantDate] FROM [mnetwork].[dbo].[sec_LoanAccess] 2) SELECT [LoanID], [Added] FROM [mnetwork].[dbo].[sec_BlockedLoansany one can help to write these stored procedure.Thanks,JT |
|