Viewing 15 posts - 2,431 through 2,445 (of 13,870 total)
This worked:
SELECT t.*
, ca.value
FROM #tblTest t
CROSS APPLY STRING_SPLIT(t.FileData, ';') ca
WHERE LEN(TRIM(ca.Value))>0;
Really?

August 28, 2020 at 7:47 pm
Parsename() works only on strings which have . (full-stop) as their delimiter.
If there are only ever two columns, here is one way:
DROP TABLE IF EXISTS #Test;
CREATE TABLE...
August 28, 2020 at 7:18 pm
You need to declare those variables in sp_executesql as OUTPUT parameters
And map them to package variables, to use them in subsequent tasks.
August 28, 2020 at 3:21 pm
Select Math from the Formula Type drop down list;
In the Choose a formula listbox, select SUMPRODUCT with criteria option;
No such option is available from within SSMS, as far as...
August 28, 2020 at 1:15 pm
Are you changing the file extension from .xls to .xlsx, by any chance?
August 28, 2020 at 1:06 pm
I suspect that there is some configuration on the server where the script is working which overrides the default (and invalid) path. It is unlikely that the SQL script is...
August 27, 2020 at 2:11 pm
Yes! That will do nicely. Thank you very much for your time.
No problem, thanks for posting back.
August 26, 2020 at 7:16 pm
PS, that's not a row, it's a column 🙂
August 26, 2020 at 7:00 pm
Like this?
SELECT SUM(TxQty*AvgCostOld) AS TotalTransactionCost
FROM tblimInvTxHistory
WHERE TxDate > '2020-08-25'
AND TxCode = 'ADJ'
August 26, 2020 at 7:00 pm
If you are going to SUM over a collection of rows, you need to define the grouping to SUM over.
All rows? By item? By date?
August 26, 2020 at 6:52 pm
Makes it easier. Try this.
SELECT CalcTextName = CASE
...
August 26, 2020 at 5:51 pm
OK, so the requirement now is "remove any square brackets and any text they may contain", is that correct?
August 26, 2020 at 5:39 pm
None of your revised test data matches this requirement:
If the square bracket is found at the beginning of string and is followed by '-' then I want entire text after...
August 26, 2020 at 5:15 pm
The drivers that Jeff refers to are not installed by default.
The 2010 versions are here.
The 2016 versions are here.
(I can't remember which version he prefers.)
August 26, 2020 at 2:33 pm
that really is normally task for 3 individuals - good luck finding someone that can fill all of them.
I'd throw my hat into the ring, if it weren't for...
August 25, 2020 at 8:45 pm
Viewing 15 posts - 2,431 through 2,445 (of 13,870 total)