Viewing 15 posts - 76 through 90 (of 1,390 total)
The larger query I have has many fields with converts etc. so I am trying not to add the CustomerId to the nested query to get the sum somehow...
July 16, 2024 at 6:16 pm
Assuming the parts to be split are: 1) the sentence on the left, and 2) the single string on the right. It appears after the initial 50 character split of...
July 3, 2024 at 9:35 pm
In Visual Studio working with git (and GitHub, Gitlab, etc.) seems more streamlined and user friendly. SSMS clunky. For almost everything SQL Server related I use VS but still have...
July 1, 2024 at 1:36 pm
Maybe you could try OFFSET and FETCH NEXT on the righthand side of OUTER APPLY
declare
@nth_from_top int=2,
@nth_from_bot ...
June 15, 2024 at 11:48 am
The problem in Steve's solution is that is doesn't account for possible CR/LF data in the last field. In your data - there is a CR\LF after the comma...
June 8, 2024 at 12:26 pm
Bump for visibility
June 8, 2024 at 12:01 pm
Here's the code I'm running and the results I'm seeing. The @string value was copy/pasted. Thanks btw to Jeff for the splitter code.
drop FUNCTION if exists [dbo].[DelimitedSplitN4K];
go
CREATE...
June 7, 2024 at 10:31 pm
I did originally post this question under my personal account and this is from my work account.
I did think about using a second replace statement but could not devise...
June 7, 2024 at 11:31 am
One way could be to use the same replacement technique as with the line breaks. Replace the "," and ", and ," with |. Then replace any remaining double quotes...
June 6, 2024 at 12:50 am
Interestingly, the desired output is however considered valid JSON, at least according to https://jsonlint.com/
In the JSON Standards docs they call the forward slash symbol a 'solidus' and a...
May 31, 2024 at 8:47 pm
It seems that the T-SQL JSON functions deem any string containing a single / character as invalid and escape it accordingly.
Yes removing the escape characters would invalidate the JSON...
May 31, 2024 at 12:01 pm
Is this really SQL Server 2012? Extended support for SQL Server 2012 ended last year. Why are the AMOUNT and PRICE of data type FLOAT? Generally, columns with those names...
May 31, 2024 at 12:55 am
... or should I post the rest of my code, on how to inlcude this in there?
The code posted seems to have issues imo. Can't be certain tho. ...
May 27, 2024 at 2:09 pm
We're not just a forum, though. This is a whole publishing engine that gets article submissions, runs them through a queue, publishes, scheduled, generates a newsletter, has the daily...
May 23, 2024 at 2:49 pm
Imo the issue with assigning value(s) to variable(s) and then using variable(s) to resolve flow of control is it can create race conditions. Then database serialization is attempted to hold...
May 20, 2024 at 7:19 pm
Viewing 15 posts - 76 through 90 (of 1,390 total)