This question already has an answer here:
SSIS Derived Column System Variable Length
(1 answer)
Closed 6 months ago.
I want to change the derived column's length in my SSIS package from 8 to 100
How can I do that?
To increase the length of a derived column or generally change the type, you need to explicitly cast it
Current
#[User::Inp_FileName]
Revised
(DT_WSTR, 100) #[User::Inp_FileName]
Cast the Variable Inp_FileName to a data type of unicode string, length 100.
Related
This question already has answers here:
Reference for a dynamic range
(1 answer)
Row-wise textjoin of dynamic array with lookup
(2 answers)
Closed 1 year ago.
For simplicity, let us consider a number columns that are filled with values generated by the SEQUENCE formula with a variable number of rows (common for all columns).
What I would like to obtain is another column array (with the same variable number of rows) where each row or element of the array is a TEXTJOIN formula of the elements of that row.
The first small issue is that while it is possible to refer to a single array, e.g. A1#, it is not possible to refer to a range of them and do something like A1#:F1#. It is somewhat inconvenient but I could add the individual arrays to the TEXTJOIN formula (A1#,B1#,C1#,D1#,...). [Correction: It is actually possible to do so]
The main problem is that I have not found any way to get the corresponding concatenated strings for each of the rows. I do not know if I have not found the way or it is simply not possible. A VBA alternative would not be ideal but could be considered as well.
This question already has answers here:
SQL BETWEEN Operator conditional value in Reverse Order
(3 answers)
T-SQL BETWEEN problem max value first
(2 answers)
Closed 6 years ago.
Assume we have a table with an int column (primary key) and few other columns as well and above table contains data.
This query is working:
SELECT *
FROM Table
WHERE Id BETWEEN 1 AND 5
However, this query is not working:
SELECT *
FROM Table
WHERE Id BETWEEN 5 AND 1
I need an explanation why inverse not working when I swap operands. Please explain.
From the manual: "BETWEEN returns TRUE if the value of test_expression is greater than or equal to the value of begin_expression and less than or equal to the value of end_expression."
This is related to the following discussion
Multiple dynamic values in a Pro *C query IN clause
My question is: What determines the value of L[..], is it the length of data defined in Oracle Table Description as Varchar(100) or size of the destination buffer of character array say defined of size 50 i.e. char xx[50]; then should L[..] be 100 or 50? And data type T[..] should be 1?
If I use data type T[..] as 6, then will the value of L[..] change?
What about datatypes in destination (our own data structures where we fetch the results) are declared as int, long, short whereas Oracle side datatype is NUMBER(10), what we should use as T[..]? 3? and length L[..] as sizeof(int)?
Please help me with a detailed note on usage of L and T variables related to the V variable.
This question already has answers here:
How to check for Is Not Null in VBA?
(2 answers)
Closed 7 years ago.
While retrieving data from a database into an array one of my array elements is (or appears to be) 'Null', as the watch window shows.
However, pCurveDefinitions(2,0)=Null return FALSE.
How can I make the check in such a way it returns TRUE?
This is just a different test, like IsError, you should use IsNull(pCurveDefinitions(2,0))!
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Generating random strings with T-SQL
I need to generate a random string with alpha and numeric characters inside a trigger.
The string must have a length of 15 and uppercase.
Someone have an idea?
This is far from an optimal solution, but it will work as specified:
select char(rand()*26+65)+char(rand()*26+65)+char(rand()*26+65)
+char(rand()*26+65)+char(rand()*26+65)+char(rand()*26+65)
+char(rand()*26+65)+char(rand()*26+65)+char(rand()*26+65)
+char(rand()*26+65)+char(rand()*26+65)+char(rand()*26+65)
+char(rand()*26+65)+char(rand()*26+65)+char(rand()*26+65)
Example output:
WCZOVRCIRELAJUT
generate a GUID and take just the first 15 characters?
Generate a bunch of random numbers and translate to their ASCII values?