Viewing 15 posts - 481 through 495 (of 1,464 total)
The answer to this SO question explains why it is a reserved word
https://stackoverflow.com/questions/4054511/what-exactly-does-the-t-sql-lineno-reserved-word-do
August 29, 2019 at 7:25 am
The different behaviours are documented here
https://docs.microsoft.com/en-us/sql/t-sql/functions/json-value-transact-sql?view=sql-server-2017
August 29, 2019 at 7:22 am
You need to get the min AdmissionDate per group first
WITH cteGroupDate AS (
SELECT *
...
August 29, 2019 at 7:11 am
This will concatenate the values as per the sample data
SELECT STUFF((
SELECT ',filename=''' + RTRIM(FileName) + ''''
...
August 28, 2019 at 4:28 am
Assuming a low number of "Work" items, this pattern will work
SELECT
d.[Date]
, [Security] = STUFF((SELECT ' & '...
August 27, 2019 at 3:59 pm
How many unique "Work" items are there?
If there are 3 names, must they be "Name1 & Name2 & Name3"?
August 27, 2019 at 3:00 pm
August 27, 2019 at 2:58 pm
Thanks for all the replies 🙂
@DesNorton:
The reason is that SQL does not short-circuit the OR, and has to evaluate the "@ProjectID IS NULL" against every record in the index/table...
August 23, 2019 at 11:45 am
In [dbo].[Sola_uspLogError] , rather use
SET @ErrorLogID = SCOPE_IDENTITY();
In [dbo].[INSE] , the call to EXECUTE [dbo].[Sola_uspLogError] is before the ROLLBACK. This will cause the error information that was...
August 22, 2019 at 8:13 pm
Don't use functions in a WHERE clause if you can avoid it, as they destroy "sargability".
In this case, just directly check each variable for NULL or a match, as...
August 22, 2019 at 6:17 pm
I have meant 200 rows of code
Column1,
Column2,
----
Column200
I appreciate SSMS will generate it for me, yet again, I was hoping to have neater solution, something like one would do in...
August 22, 2019 at 12:44 pm
This is how I handle variable inputs
DECLARE @ProjectID int = 300;
DECLARE @ProjectName varchar(100) ...
August 22, 2019 at 12:36 pm
Thanks. That works fine. But the one issue that remains is there is a duplicate value for Bids in the NF is duplicated and there should be only one....
August 20, 2019 at 2:17 pm
Look at the progress we've got in SQL over the years!
what used to be 13 years ago a short inline formula using system functions and integer arithmetic is...
August 20, 2019 at 12:54 pm
Duplicate post
https://www.sqlservercentral.com/forums/topic/convert-seconds-to-minutes-2#post-3672679
August 20, 2019 at 10:13 am
Viewing 15 posts - 481 through 495 (of 1,464 total)