Advertisement

[x]
Attachment Details

Update field using data from View

[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.2
I have a table in my database called crmAfterCareData. I've also created a View that holds some info from another table (crmApplicationData_ToUse) and some data from crmAfterCareData. My View looks something like this:

SELECT     TOP (100) PERCENT dbo.crmApplicationData_ToUse.BusinessRef, dbo.crmApplicationData_ToUse.App_No,
                      dbo.crmAftercareData.App_No AS AC_App_No, dbo.crmApplicationData_ToUse.PSYBT_Loan_Applied_For,
                      dbo.crmApplicationData_ToUse.PSYBT_Grant_Applied_For
FROM         dbo.crmApplicationData_ToUse LEFT OUTER JOIN
                      dbo.crmAftercareData ON dbo.crmApplicationData_ToUse.BusinessRef = dbo.crmAftercareData.BusinessRef
WHERE     (dbo.crmApplicationData_ToUse.PSYBT_Loan_Applied_For > 0) AND (dbo.crmApplicationData_ToUse.PSYBT_Grant_Applied_For > 0) AND
                      (RIGHT(dbo.crmApplicationData_ToUse.App_No, 1) = 1) AND (RIGHT(dbo.crmAftercareData.App_No, 1) = 2)
ORDER BY dbo.crmApplicationData_ToUse.BusinessRef

and the returned data looks something like this:

BusinessRef      App_No      AC_App_No      PSYBT_Loan_Applied_For      PSYBT_Grant_Applied_For
01-00008      01-00008-1      01-00008-2      750      750
01-00009      01-00009-1      01-00009-2      2000      750
01-00023      01-00023-1      01-00023-2      5000      2000
01-00072      01-00072-1      01-00072-2      2000      1000
01-00091      01-00091-1      01-00091-2      5000      1000

I have about 12500+ records in this table all with data like the above.

What I need to do is to update the crmAfterCareData table and overwrite AC_App_No with App_No where BusinessRef in the crmApplicationData_ToUse table = BusinessRef in crmAfterCareData but only the data contained in this View shoulld be used as I have about another 30000+ records in the crmAfterCareData table that should not be updated at all. Some of the other data also has the same BusinessRef numbers as the table above but they don;t match the criteria check done in the View and as such they should not be altered.

Any ideas how I can go about this?
Related Solutions
Related Solutions
 
Loading Advertisement...
 

Rank: Master

Expert Comment by VMontalvao:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 

Rank: Genius

Accepted Solution by chapmandew:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Author Comment by u101440:

All comments and solutions are available to Premium Service Members only.

Start your 7-day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
Loading Advertisement...
20080924-EE-VQP-40 / EE_QW_2_20070628