You can use this transformation to perform the following tasks:
- Concatenate data from different columns into a derived column. For example, you can combine values from the FirstName and LastName columns into a single derived column named FullName, by using the expression
FirstName + " " + LastName
. - Extract characters from string data by using functions such as SUBSTRING, and then store the result in a derived column. For example, you can extract a person's initial from the FirstName column, by using the expression
SUBSTRING(FirstName,1,1)
. - Apply mathematical functions to numeric data and store the result in a derived column. For example, you can change the length and precision of a numeric column, SalesTax, to a number with two decimal places, by using the expression
ROUND(SalesTax, 2)
. - Create expressions that compare input columns and variables. For example, you can compare the variable Version against the data in the column ProductVersion, and depending on the comparison result, use the value of either Version or ProductVersion, by using the expression
ProductVersion == @Version? ProductVersion : @Version
. - Extract parts of a datetime value. For example, you can use the GETDATE and DATEPART functions to extract the current year, by using the expression
DATEPART("year",GETDATE())
.
http://msdn.microsoft.com/en-us/library/ms141069.aspx
No comments:
Post a Comment