Viewing 15 posts - 2,611 through 2,625 (of 13,853 total)
Oh dear, you have 2016 – STRING_AGG() does not work there, apologies.
Note also that your original code does not run – the column widths are not of sufficient size.
June 8, 2020 at 8:13 pm
Possibly something like this:
SELECT *
FROM #CommaSeparatedString css;
WITH ordered
AS (SELECT css.ID
,NewValue = STRING_AGG(ss.value, ',') WITHIN GROUP(ORDER BY ss.value)
...
June 8, 2020 at 8:11 pm
Our plan was not to store the ISPAC's, but I wasn't sure if they were like exe's. I know I generally exclude the entire BIN and OBJ folder for C#...
June 8, 2020 at 7:52 pm
Can you show us the schema of the table you wish to INSERT to?
Do you wish to insert all of the output into a single XML column? Or are you...
June 8, 2020 at 7:42 pm
My own practices are mostly in line with Tim's.
But don't put ISPACs in source control, for the same reasons you don't put EXEs in source control ... it's a waste...
June 8, 2020 at 1:27 pm
It's just XML. Try renaming to .txt and uploading again.
Edit: or .XML.
June 5, 2020 at 12:55 pm
Hello,I have this execution plan and the query last 24 h. How we can improve it?
Thanks,
Hadrian
Which execution plan?
June 5, 2020 at 12:48 pm
If you want a set of data to be processed by a stored procedure, could you simply load it into a staging table, then run the stored procedure to...
June 4, 2020 at 7:03 pm
Do you understand why there would be a difference between the execution plans for
CREATE Proc x AS
Select * from tab1
and
Select * from tab1
? The first is pretty much useless, it's...
June 4, 2020 at 7:01 pm
Well, that's unexpected ... but I have a solution for you. If you first REPLACE all instances of "" with " " (a single space) before using TOKEN, things seem...
June 3, 2020 at 1:58 pm
My solution depends on there being the same number of quotation marks (") in every string which is split.
If an 'empty' column appears as "", the solution should still work....
June 3, 2020 at 1:15 pm
Thom, this is great. Thank you for taking the time to write it out so clearly.
but I'm always surprised more people don't use it
Almost all of my development is done...
June 3, 2020 at 1:11 pm
This can be done, if you think laterally: make " your delimiter and your formulas become:
TOKEN( SourceRecord,"\"",1)
TOKEN( SourceRecord,"\"",3)
TOKEN( SourceRecord,"\"",5)
TOKEN( SourceRecord,"\"",7)
TOKEN( SourceRecord,"\"",9)
Having said that, Frederico's suggestion is better,...
June 3, 2020 at 1:09 am
Years later - if someone stumbles over this: WITH(NOLOCK) can get locks for non-SELECT statements, for example, it will get locks if it is part of an UPDATE statement....
June 1, 2020 at 2:19 pm
In this i want to add condition if @frdate Month = 3 and Date = 31 ...
May 31, 2020 at 3:44 pm
Viewing 15 posts - 2,611 through 2,625 (of 13,853 total)