Viewing 15 posts - 4,996 through 5,010 (of 7,610 total)
Here's a quick cross-tab example specific to your situation:
SELECT D.PersonID,
MAX(CASE WHEN D.Activity = 'Woke Up' THEN D.ActivityTime END) AS WakeUpTime,
MAX(CASE WHEN D.Activity...
July 1, 2015 at 2:52 pm
You didn't get an error because a bit column will treat any value greater than 1 as 1, so SQL converted the "2" to a 1.
July 1, 2015 at 2:48 pm
Try running:
sp_refreshsqlmodule or
sp_refreshview
on potentially affected objects.
You should get errors on the object(s) that now reference unknown columns.
July 1, 2015 at 2:46 pm
Jeff Moden (6/30/2015)
GilaMonster (6/30/2015)
Jeff Moden (6/30/2015)
June 30, 2015 at 7:44 pm
You can add a file to tempdb if you need to. Or explicitly expand an existing file(s) yourself.
Be extremely careful if/when trying to modify, or drop, existing objects in...
June 30, 2015 at 7:38 pm
Sean Lange (6/30/2015)
Jacob Wilkins (6/30/2015)
Based on what I've tested, Scott is technically correct. Under the right conditions, even where it...
June 30, 2015 at 7:11 pm
You'll probably need to use ROW_NUMBER() for now:
;WITH CTE_sales AS (
SELECT
date_created, sales,
...
June 29, 2015 at 11:07 am
Jeff Moden (6/26/2015)
ScottPletcher (6/26/2015)
Sean Lange (6/26/2015)
ScottPletcher (6/25/2015)
GilaMonster (6/25/2015)
Nolock hints, do you know what they do? (hint, they don't make queries faster)
Why does everyone keep repeating that?
Scott you have been...
June 27, 2015 at 10:32 pm
Sean Lange (6/26/2015)
ScottPletcher (6/25/2015)
GilaMonster (6/25/2015)
Nolock hints, do you know what they do? (hint, they don't make queries faster)
Why does everyone keep repeating that?
Scott you have been around sql long...
June 26, 2015 at 4:22 pm
Jeff Moden (6/25/2015)
ScottPletcher (6/25/2015)
sgmunson (6/25/2015)
ScottPletcher (6/25/2015)
GilaMonster (6/25/2015)
Nolock hints, do you know what they do? (hint, they don't make queries faster)
Why does everyone keep repeating that? Of course NOLOCK hints...
June 26, 2015 at 2:10 pm
sgmunson (6/25/2015)
ScottPletcher (6/25/2015)
GilaMonster (6/25/2015)
Nolock hints, do you know what they do? (hint, they don't make queries faster)
Why does everyone keep repeating that? Of course NOLOCK hints make queries run...
June 25, 2015 at 2:20 pm
sgmunson (6/25/2015)
ScottPletcher (6/25/2015)
WHERE
...
June 25, 2015 at 2:18 pm
I prefer this approach [Edit: Because of its clarity, and to avoid using functions in the WHERE clause, which should be avoided whenever (reasonably) possible]:
WHERE
(requirementGradYear...
June 25, 2015 at 12:24 pm
GilaMonster (6/25/2015)
Nolock hints, do you know what they do? (hint, they don't make queries faster)
Why does everyone keep repeating that? Of course NOLOCK hints make queries run faster, even...
June 25, 2015 at 12:21 pm
Select [C1] ,
[C2] ,
DATEADD(S, C3, '1970-01-01 00:00:00') AS [C3] ,
[C4] ,
[C5] ,
[C6] ,
[C7] ,
[C8] ,
[C112],
[C675001003] ,
[C812000101] ,
[C875000000] ,
[C875000001],
[C875000002] ,
[C875000003] ,
[C875000004] ,
[C875156000] ,
[C875156001] ,
[C875156002] ,
[C875156005] ,
[C875156006] ,
[C875156007] ,
[C875156003] ,
[C875156004]...
June 23, 2015 at 12:30 pm
Viewing 15 posts - 4,996 through 5,010 (of 7,610 total)