What is query to map data by combining multiple columns in different table
I have two tables named table 1 and table 2 respt..
In table 1 is as shown below
User Role AP.A AP.B AP.C AP.D High Low Medium
Sanket Admin AP.A AP.B AP.D
Abhi Man AP.B AP.C
Sank Emp AP.A AP.C AP.D
And I have one more table as shown below :
Group1 Group2 Risk_Level
AP.A AP.B High
AP.C AP.D High
AP.A AP.C Low
AP.B AP.D Medium
Now,
I want to map risk level to table 1 based on combinations given in table 2.
If risk level is "High" then i have to put "Yes" under column "High" in table 1.
Could any one of you please advise me...
thanx in advance...
Sanket
Software/Hardware used:
ASKED:
October 4, 2012 7:40 AM
UPDATED:
October 4, 2012 11:56 AM
Need urgent help
If you need urgent help, you should put a useful subject on your question. Those who read the subject cannot tell if your question fits with their knowledge or not. Many will just skip a question that doesn’t identify itself.
In table 1 is as shown below
“Below”? Below what?
User Role AP.A AP.B AP.C AP.D High Low Medium Sanket Admin AP.A AP.B AP.D Abhi Man AP.B AP.C Sank Emp AP.A AP.C AP.D
I can’t make any sense out of that.
Now, I want to map risk level to table 1 based on combinations given in table 2.
It might be easy, but I can’t determine anything about the structure of either table. I don’t know how many columns are in the tables, how the columns are defined, which columns hold what values.
You need to provide a much better description of the tables and columns. Please try again.
Tom
I agree with Tom we need a lot more clarification if we are going to make an attempt to solve the issue. Are you referencing 4 table in your example? What do you want you final data to look like ? Are there more than 1 possible join value ? … We need more details..
To have better chances of a useful (and possibly quick) answer, you should:
-Use a well thought question title (as mentioned by Tom)
-Put an amount of effort that is proportional to the importance of the problem for you, when describing your problem and wording your question
-Provide your data structures as clearly as possible
-Provide some example data, along with the results you would expect from it.
-Provide information about the database platform you are using, in case there is a non-standard but easier way to solve it on that specific platform.
-Tag your question appropriately