Task Factory users running version 2020.1.4 or older (released prior to May 27, 2020): There's an important Task Factory update. Please visit here for more details.
FileAppendAllText
Description
Append text to the end of a file contents.
Syntax
FileAppendAllText( Path, Text [, Encoding])
Returns
Boolean. If the path does not exist, null is returned.
Parameters
Name
Optional
Description
Path
false
The path where the file is located.
Text
false
Text to append to file contents.
Encoding
true
Encoding to use to write to file. Choices are ASCII, UNICODE, UTF7, UTF8, UTF32 or Default.
Examples
FileAppendAllText("C:\ssis\test.xml", "Wrox Professional SSIS 2012")
FileChangeExtension
Description
Changes the file extension from one to another.
Syntax
FileChangeExtension( Path, New_Extension )
Returns
String. The path to the file with the new extension.
Parameters
Name
Optional
Description
Path
false
The path to the file.
New_Extension
false
The new extension of the file with or without the period. Pass in null to remove the extension.
Examples
FileChangeExtension("C:\ssis\test.xml", "txt")
FileCombinePath
Description
Combines the path of files together. It handles all of the checking for slashes and adds or removes them.
Syntax
FileCombinePath( Path1, Path2 )
Returns
String. The combination of path1 and path2 with all slashes added or removed.
Parameters
Name
Optional
Description
Path1
false
The first part of the path.
Path2
false
The second part of the path.
Examples
FileCombinePath("C:\ssis", "test.xml")
FileCopy
Description
Copy a file from one location to another .
Syntax
FileCopy( Source, Destination [, Overwrite])
Returns
Boolean. If the copy succeeds. Null of either parameter is null or either the source file doesn't exist.
Boolean. If the path does not exist, null is returned.
Parameters
Name
Optional
Description
Path
false
The path where the file is located.
Text
false
Text to write to the file.
Encoding
true
Encoding to use to write to file. Choices are ASCII, UNICODE, UTF7, UTF8, UTF32 or Default.
Examples
FileWriteAllText("C:\ssis\test.xml", "Wrox Professional SSIS 2012")
First
Description
Aggregation that returns the first value of the group. Can only be used as part of the Advanced Aggregation component
Syntax
First( Value [, Condition])
Returns
Object.
Parameters
Name
Optional
Description
Value
false
The value to add to the aggregation
Condition
false
The condition allows you to conditionally add values to the aggregation based on the expression. For instance, you could define the aggregate as First(SalesTotal, CustomerState="FL") and this would only add the value to the aggregation if the customers state was florida.
Returns the largest integer less than or equal to the numeric value you pass to this function. For example, if you pass 3.14 to FLOOR, the function returns 3. If you pass 3.98 to FLOOR, the function returns 3. Likewise, if you pass -3.17 to FLOOR, the function returns -4.
Syntax
FLOOR( Numeric_Value )
Returns
Integer if you pass a numeric value with declared precision between 0 and 28. Double if you pass a numeric value with declared precision greater than 28. NULL if a value passed to the function is NULL.
Parameters
Name
Optional
Description
Numeric_Value
false
Numeric datatype. You can enter any valid task editor as long as it evaluates to numeric data.
String. Returns an expression formatted as a currency.
Parameters
Name
Optional
Description
Expression
false
Expression to be formatted.
Digits_After_Decimal
false
Numeric value indicating how many places are displayed to the right of the decimal. The default value is –1, which indicates that the computer's regional settings are used.
Include_Leading_Digit
false
Indicates whether a leading 0 is displayed for fractional values. Values are 0 for False, -1 for True
Use_Parens_For_Negative_Numbers
false
Indicates whether to place negative values within parentheses. Values are 0 for False, -1 for True
Group_Digits
false
Indicates whether or not numbers are grouped using the group delimiter specified in the locale settings. Values are 0 for False, -1 for True
Examples
FormatCurrency("4589.932", 2)
FormatDateTime
Description
Returns an expression formatted as a date
Syntax
FormatDateTime( Expression [, Date_Format] )
Returns
String. Returns an expression formatted as a date.
Parameters
Name
Optional
Description
Expression
false
Date expression to be formatted.
Date_Format
false
Numeric value that indicates the date/time format used. If omitted, DateFormat.GeneralDate is used. Values are<br /> General Date = 0<br /> Long Date = 1<br /> Short Date = 2 <br /> Long Time = 3<br /> Short Time = 4
String. Returns an expression formatted as a number.
Parameters
Name
Optional
Description
Expression
false
Expression to be formatted.
Digits_After_Decimal
false
Numeric value indicating how many places are displayed to the right of the decimal. The default value is –1, which indicates that the computer's regional settings are used.
Include_Leading_Digit
false
Indicates whether a leading 0 is displayed for fractional values. Values are 0 for False, -1 for True
Use_Parens_For_Negative_Numbers
false
Indicates whether to place negative values within parentheses. Values are 0 for False, -1 for True
Group_Digits
false
Indicates whether or not numbers are grouped using the group delimiter specified in the locale settings. Values are 0 for False, -1 for True
String. Returns an expression formatted as a percentage.
Parameters
Name
Optional
Description
Expression
false
Expression to be formatted.
Digits_After_Decimal
false
Numeric value indicating how many places are displayed to the right of the decimal. The default value is –1, which indicates that the computer's regional settings are used.
Include_Leading_Digit
false
Indicates whether a leading 0 is displayed for fractional values. Values are 0 for False, -1 for True
Use_Parens_For_Negative_Numbers
false
Indicates whether to place negative values within parentheses. Values are 0 for False, -1 for True
Group_Digits
false
Indicates whether or not numbers are grouped using the group delimiter specified in the locale settings. Values are 0 for False, -1 for True
Examples
FormatPercent("4589.932", 2)
FV
Description
Returns the future value of an investment, where you make periodic, constant payments and the investment earns a constant interest rate.
Numeric. Interest rate earned in each period. Expressed as a decimal number. Divide the percent rate by 100 to express it as a decimal number. Must be greater than or equal to 0.
Terms
false
Numeric. Number of periods or payments. Must be greater than 0.
Payment
false
Numeric. Payment amount due per period. Must be a negative number.
Present_Value
true
Numeric. Current value of the investment. If you omit this argument, FV uses 0.
Type
true
Integer. Timing of the payment. Enter 1 if payment is at the beginning of period. Enter 0 if payment is at the end of period. Default is 0. If you enter a value other than 0 or 1, the Integration Service treats the value as 1.