Viewing 15 posts - 1,021 through 1,035 (of 2,648 total)
DECLARE @DateString nvarchar(100)='Wed Jun 29 15:57:45 2019'
SELECT CONVERT(datetime,SUBSTRING(@DateString,5,100))
June 6, 2020 at 2:36 am
I would change the WHERE in the last query to:
FROM staging.sfSurveillanceRecordHeader s1
WHERE NOT EXISTS (SELECT *
...
June 5, 2020 at 2:19 pm
So yesterday we got a bit of good/bad news...
Good, in that the wife has been called back to work and goes back on Tuesday.
Bad, in that the...
May 31, 2020 at 1:00 am
So yesterday we got a bit of good/bad news...
Good, in that the wife has been called back to work and goes back on Tuesday.
Bad, in that the wife got...
May 30, 2020 at 6:32 pm
If output_response_xml =''
then the expression:
LEN(output_response_xml) - LEN(LEFT(output_response_xml,
CHARINDEX ('>Thank you', output_response_xml))) - LEN(RIGHT(output_response_xml, LEN(output_response_xml) - CHARINDEX ('', output_response_xml))) - 1
Is equal to -1, which will give you the error you have.
May 29, 2020 at 10:02 pm
DELETE tp
FROM TESTPO tp
WHERE STATUS = 1
AND EXISTS(SELECT *
...
May 28, 2020 at 10:23 pm
So this will only affect queries involving tempdb collation?
What about when join other user database (not system ones) with different collations?
Thanks
If they are different collations then you will have...
May 21, 2020 at 4:54 pm
I didn't mean that as a slam. It's just not possible to post general guidlines because everyone's stuff is different. I just watched the following YouTube on the subject......
May 20, 2020 at 10:16 pm
It would be helpful if you knew which particular statements within the stored procedure are the long running ones. The first thing to do is identify which statement(s) are taking...
May 19, 2020 at 4:59 pm
Really you should have the databases set to the same collation as the tempDB as if you create a temporary table you will have problems joining it to your database...
May 16, 2020 at 1:36 am
I think the most obvious way to rewrite that query would be:
SELECT u.UserId
FROM UserTable u
WHERE EXISTS(SELECT *
...
May 12, 2020 at 7:29 pm
;WITH myTable AS
(
SELECT *
FROM (VALUES (1,10,'Deny','Denied','a','04/05/2020'),
...
May 11, 2020 at 1:18 pm
An FK is a constraint that enforces the values in the column(s) are present in the primary-key/unique-index of the related table.
May 7, 2020 at 5:58 pm
It allows you to create more general purpose flexible SQL statement because the full text of the SQL statements may be unknown at compilation
Rather than 'compilation', I'd suggest 'time...
May 7, 2020 at 1:28 pm
An alternative is like below. Which performs better depends on total data volume and index(es) present:
Edit: I'm at work so I have only a limited time to review...
May 5, 2020 at 2:45 pm
Viewing 15 posts - 1,021 through 1,035 (of 2,648 total)