|
I have reference table and Main table.. in referencetable i have values like in Main table need to fill levels based on condition on rootnames expecting is plz ..Thanks in Advance
(comments are locked)
|
|
I have reference table and Main table.. in referencetable i have values like in Main table need to fill levels based on condition on rootnames expecting is plz ..Thanks in Advance
(comments are locked)
|
Once you sign in you will be able to subscribe for any updates here
By RSS:Topics:
asked: Sep 28 '11 at 11:00 AM
Seen: 251 times
Last Updated: Sep 29 '11 at 09:31 AM
Copyright © 2002-2012 Simple Talk Publishing. All Rights Reserved. If you have any queries, please contact the site administrators.
Ask SQL Server Central is a community service provided by Red Gate.
Can you suppliy your code where you have tried to resolve this?
@Mahesh Please elaborate on what you need. I formatted your question, but still the final data does not make much sense yet. Are you sure that the data is correct?
In maintable rootname should search in all 3 columns reference table if it match in any one column the return root_name down1_name down2_name to main table to fill level1 level2 level3 accordingly.. ex:1 take vegetable in main table , it will search in reference table first column no luck,then second column no luck, then third column yes got it ,then return vegetable,null,null.ex:2 take carrot in main table , it will search in reference table first column no luck,then second column yes got it ,then return vegetable,carrot,null.