Viewing 13 posts - 1 through 13 (of 13 total)
OK, here is another solution that I believe is stripped down to the basics:
INSERT INTO [#gpa]
VALUES (1,'math',3),
(1,'eng',4),
...
July 31, 2015 at 6:33 am
Try the following, the concept is:
1. do a cross join of all courses and terms
2. left join the results of the cross join to the marks...
July 30, 2015 at 1:51 pm
I am surprised that nobody has mentioned the obvious next requirement which is an accessible and searchable repository where people can research and find previously performed proofs to allow people...
May 26, 2015 at 8:45 am
I believe this will handle your first case:
SELECT [col1ID]
, CAST(CASE WHEN MIN([Col2ID]) = MAX([Col2ID]) THEN 1 ELSE 0 END AS BIT) AS [Bit]
FROM...
April 18, 2014 at 6:55 am
For the set-based, tally table, CTE freaks among us, here is a set-based solution that uses a tally table and CTEs:
SET NOCOUNT ON;
-- The @Strings table variable represents whatever...
April 9, 2014 at 9:46 am
Dwain,
I liked your analysis of the different options for building a resultset that included both an in-effect and an out-of-effect date, BUT I think you missed the boat on the...
March 18, 2014 at 7:47 am
Things to keep in mind:
- the BETWEEN operator is the logical equivalent of ">= and <=".
- the DATETIME datatype has...
September 25, 2013 at 6:58 am
Apologies for not being clear... I've been in a real crunch for the last week or so.
What I meant was just exactly what you said. You write the data...
September 11, 2013 at 8:34 am
Part of the reason why Paul S. might be seeing some instability is because he didn't trust the @Bitbucket variable and took to writing to disk. Depending...
September 11, 2013 at 7:06 am
dwain.c (9/10/2013)
I am also running on a SQL Server that is fairly quiescent (no other processes...
September 11, 2013 at 6:23 am
OK, this one really sucked me in for more than I planned on doing!
I was surprised by the variability in the results and thought that there had to be something...
September 10, 2013 at 10:22 am
Interestingly, by using a variable instead of 1000000 it was faster, but using a variable instead of 1000 makes it slower!
Here is the script I used for testing followed by...
September 10, 2013 at 7:10 am
Here is another variation on the math method that my testing says is a little faster:
DECLARE @Billion INT;
SET @Billion = 1000000000;
SET STATISTICS TIME ON;
SELECT @Bitbucket...
September 10, 2013 at 6:43 am
Viewing 13 posts - 1 through 13 (of 13 total)