Quantcast
Channel: SQL Server Master Data Services forum
Viewing all articles
Browse latest Browse all 1311

Business rule to concatenate columns with Hyphens in between

$
0
0

Hi,


I want to create a business rule to concatenate multiple columns , with a hyphen in between - Ex: If the column1 is 'Asia' and column2 is  'India' and Column3 is 'MadhyaPradesh' and column4 is 'MuzzafarNagar', then it should populate Asia-India-MadhyaPradesh-MuzzafarNagar. I created a business rule like , concatenate columns -> Column 1+ '-'+ Column 2+ '-'+Column 3+ '-'+Column 4. Its working for these kind of values

Now, the issue is, NOT all the columns have values. For example, if the column 2 and column 3 values are blank, then I am getting the values as Asia- - -. In this case, if the column value is blank, then i don't want the column.   Please help me how to apply this rule for these kind of scenarios?


Viewing all articles
Browse latest Browse all 1311

Trending Articles