campbell1972
asked on
Parsing field value based upon derived dataset
Experts
I am attempting to CASE a column in a view based upon a select against a separate table.
The select will return a number of distinct values; this will then be used to CASE the column in the view. This column will contain space-separated values in the form '1 2 3 4 5 A C D', etc
Consequently, if the select statements returns values of 1,2,3 and any or all of these values appears in the view column, the column should be updated as 'COMPLIANT' for example.
We're no doubt looking at a UDF here but any pointers you could offer would be appreciated.
Thanks
JC
I am attempting to CASE a column in a view based upon a select against a separate table.
The select will return a number of distinct values; this will then be used to CASE the column in the view. This column will contain space-separated values in the form '1 2 3 4 5 A C D', etc
Consequently, if the select statements returns values of 1,2,3 and any or all of these values appears in the view column, the column should be updated as 'COMPLIANT' for example.
We're no doubt looking at a UDF here but any pointers you could offer would be appreciated.
Thanks
JC
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
OK, if you need code that more closely fits your table structure, please post that structure.
ASKER
Unfortunately the design is inherited and due to pressure of timescale there is very little I can do about that.
However, what you have suggested does sound like a possibility. I'll investigate further and get back to you.
JC