Viewing 15 posts - 46 through 60 (of 2,456 total)
It would be cool if there were a WITHOUT keyword.
...
FROM <table> WITHOUT (INDEX(<index(s) you dont want to use>))
October 3, 2019 at 3:03 pm
Redgate SQL Prompt is useful for this kind of thing. It's not as intuitive as you would describe but it will help you identify unused variables, parameters and columns, which...
September 17, 2019 at 11:13 pm
And thanks to your lack of netiquette, we have no DDL.
I think what I posted should answer the OP's question as well as yours Joe.
September 16, 2019 at 7:01 pm
You can use TOP and ORDER BY NEWID() like this:
-- Sample data
DECLARE @yourdata TABLE
(
Family INT,
Room INT,
subfamily INT
);
INSERT @yourdata VALUES (1,5,6),(2,5,7),(3,5,7),(4,2,3),(4,2,4);
-- Number of Rows
DECLARE @rows INT...
September 16, 2019 at 4:19 pm
. This particular article, well I regret reading and discussing it. Yet again, SSC disappoints.
I would ask for your money back.
September 12, 2019 at 5:37 pm
As already mentioned - you don't want to pass other people's experience off as your own. I would never hire someone who did this nor would I respect someone who...
September 10, 2019 at 8:47 pm
August 8, 2019 at 9:42 pm
Speedy Pletcher beat me to it... More details about the requirement are in order. Here's my solution:
DECLARE @startDate DATE = '20181230', @endDate DATE = '20191230';
WITH
E1 AS...
July 30, 2019 at 5:26 pm
PatExclude or PatReplace can do the trick.
For example, this will remove any characters that are not alphanumeric while preserving spaces (note the space after the "Z"):
July 22, 2019 at 9:59 pm
Old thread, I know but there is something that has not been discussed here that I think is super important. Correctly designed CLR scalar UDFs don't have the problems that...
July 22, 2019 at 9:39 pm
You forgot to change the WHERE to ON for the INNER JOIN
Good catch John, thanks.
Does anyone know why you shouldn't use CROSS APPLY for everything? Or does it sometimes come...
July 14, 2019 at 1:23 am
Emph mine...
ANSI-89 style may have been a standard back in the day, but has long been supplemented. In fact it returns incomplete sets. There used to be a page in...
July 13, 2019 at 7:25 pm
I have this type of problem when I have too many SQL windows open or too much stuff running on my PC. The problem persists, often, even after closing the...
April 18, 2019 at 8:41 pm
My $0.02 about the new site...
First, I miss the count of likes (for threads and individual comments). No nobody knows if you "liked" a thread or comment.
As someone with articles...
April 10, 2019 at 9:15 pm
I would do something like this:
DECLARE @date DATETIME = getdate();
SELECT WeekStart = CAST(DATEADD(DAY,f.Dt+1, @date) AS date),
WeekEnd = CAST(DATEADD(DAY,f.Dt+8, @date) AS date)
FROM (VALUES(DATEPART(WEEKDAY,@date)-1)) AS w(Wd)
CROSS APPLY (VALUES(-IIF(w.Wd=0,7,w.Wd))) AS...
April 8, 2019 at 6:59 pm
Viewing 15 posts - 46 through 60 (of 2,456 total)