Viewing 15 posts - 4,291 through 4,305 (of 7,613 total)
What is the data type of "[SatisfiedPercentage]"? Because it's also part of the same CASE statement.
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
May 25, 2016 at 11:12 am
You might want to consider adding a flitered index on deceased date including the PatientNumber and DivisionCode. Then you can do an easy self-join, which I think should be...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
May 24, 2016 at 3:55 pm
Andre 425568 (5/23/2016)
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
May 23, 2016 at 10:13 am
It looks like some columns are missing from the SELECT above, so I can't try to do the full query, but here's a general approach for using a lookup table...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
May 23, 2016 at 9:41 am
IF OBJECT_ID('tempdb.dbo.#DBDATATYPES') IS NOT NULL
DROP TABLE #DBDATATYPES
CREATE TABLE #DBDATATYPES
(
DbName nvarchar(128)
,TableName nvarchar (128)
,ColumnName nvarchar (128)
,Datatype nvarchar (128)
)
INSERT INTO #DBDATATYPES
EXEC sys.sp_MSforeachdb '
IF ''?'' IN (''master'', ''msdb'')
...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
May 18, 2016 at 10:57 am
SELECT DATEADD(MONTH, DATEDIFF(MONTH, 0, START_DATETIME), 0) AS START_MONTH,
SUM(SALES) AS TOTAL_SALES
FROM MY_TABLE
WHERE START_DATETIME >= '20150101' AND START_DATETIME < '20150511'
GROUP BY DATEADD(MONTH, DATEDIFF(MONTH, 0, START_DATETIME), 0)
ORDER BY...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
May 18, 2016 at 10:50 am
Matthew Saggers-700210 (5/12/2016)
A int
B int
c int
D as A+B
E as ((A+B) / c) /...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
May 12, 2016 at 9:52 am
orjan.franzen (5/6/2016)
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
May 6, 2016 at 1:34 pm
orjan.franzen (5/6/2016)
The usage of unique indexes instead of declarative primary key constraints is just an old way of implementing entity integrity and should be avoided/forbidden if it's not for backwards...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
May 6, 2016 at 9:33 am
RichB (5/6/2016)
What utter flamebait.Congratulations.
As to people who are saying it's the DBA's job to index - Developers can't possibly be expected to grasp the subtleties... hogwash.
No, it's not....
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
May 6, 2016 at 9:30 am
Select mcr.*
FROM dbo.G_MASTER_CODING_RESULTS AS mcr WITH (NOLOCK)
left join (
SELECT
MCRNUS.MASTER_CODING_RESULTS_ID
FROM G_MASTER_CODING_RESULTS AS MCRNUS With (NOLOCK)
WHERE...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
May 5, 2016 at 1:23 pm
pietlinden (5/4/2016)
http://sqlinthewild.co.za/index.php/2009/08/17/exists-vs-in/
I would have sworn that EXISTS stops as soon as a True/False changes, while an IN reads the whole table. So I would...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
May 4, 2016 at 11:16 am
cookiemonstagt (5/3/2016)
So the data is saved on shared file and config locally .?
I coded the backups to go to c:, which is local drive for that node only,...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
May 3, 2016 at 10:29 am
Lynn Pettis (5/3/2016)
ScottPletcher (5/3/2016)
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
May 3, 2016 at 10:26 am
cookiemonstagt (5/3/2016)
.. thanks and one last question if the db is shared each node has these 3 files to be able only to run the...
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
May 3, 2016 at 10:21 am
Viewing 15 posts - 4,291 through 4,305 (of 7,613 total)