Viewing 15 posts - 6,826 through 6,840 (of 7,613 total)
Eugene Elutin (2/7/2013)
ScottPletcher (2/6/2013)
No, I wouldn't use OR just because that makes a view updateable -- UPDATEs aren't typically done using views like that anyway.
What is the problem with updateable...
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".
February 7, 2013 at 9:10 am
nick.mcdermaid (2/6/2013)
-Added a unique index to RowNum_Start
-Removed the SRC_System join (I know I know, changing the requirements is cheating )
and query time went...
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".
February 7, 2013 at 8:55 am
No, I wouldn't use OR just because that makes a view updateable -- UPDATEs aren't typically done using views like that anyway.
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".
February 6, 2013 at 2:31 pm
AND
CASE WHEN @InfoKey = 5 THEN
CLIENT_IDENTIFIER_TYPE.Code IN (028,029,030)
ELSE
CLIENT_IDENTIFIER_TYPE.Code = @Code
END
The "THEN" and "ELSE" parts of a CASE statement must evaluate to a single value. The value can...
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".
February 6, 2013 at 2:25 pm
Is the "MS Dynamics Navision ERP" application running on the same box as SQL Server in prod?
If so, I'd lower the fixed memory for SQL considerably.
Even if not, I'd still...
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".
February 6, 2013 at 10:16 am
Hmm, you could create a db with the new name, and create synonyms pointing back to the old db.
But synonyms can only be used for these types of objects:
Assembly (CLR)...
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".
February 5, 2013 at 4:54 pm
nick.mcdermaid (2/5/2013)
I can try clustering SE on RowNum_Start and RowNum_End...
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".
February 5, 2013 at 4:47 pm
If possible, you need to get rid of the massive GROUP BY (and also reduce the number of expensive joins required); that means using a subquery on CDBF.
I've taken my...
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".
February 5, 2013 at 4:43 pm
CAST(CAST(CAST(ISNULL(char_value, 0) AS decimal(5, 2)) * 100 AS int) AS varchar(5))
SELECT
CAST(CAST(CAST(ISNULL(char_value, 0) AS decimal(5, 2)) * 100 AS int) AS varchar(5))
FROM (
SELECT...
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".
February 5, 2013 at 4:18 pm
Code below should take care of the 'C' type.
The 'B' type is attempting to concatenate chars and numerics, which will always cause a conversion error, so it definitely needs changed...
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".
February 5, 2013 at 4:09 pm
SELECT
Studentid,
MIN(dateid) AS First_Absence_Date,
MAX(dateid) AS Last_Absence_Date,
COUNT(*) AS Total_Consecutive_Absences
FROM (
...
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".
February 5, 2013 at 3:46 pm
wnarretto (2/5/2013)
yes the original code is doing a select into. Your answer is what i was suggesting but a coworker mentioned that their was a filter...
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".
February 5, 2013 at 1:25 pm
Are you doing a SELECT ... INTO?
If so, that may hold schema locks for the entire duration.
Instead, do an initial "dummy" SELECT ... INTO ... WHERE 1 = 0 to...
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".
February 5, 2013 at 11:48 am
Want a cool sig (2/5/2013)
The link you are referring to is the first one in my signature. Unfortunately it doesn't do much good here because the OP is " in...
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".
February 5, 2013 at 11:00 am
nick.mcdermaid (2/5/2013)
2. HOW can I give SQL Server the clue that the ranges are mutually exclusive? There are no constraints that I can put on the table to indicate this.
You...
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".
February 5, 2013 at 10:56 am
Viewing 15 posts - 6,826 through 6,840 (of 7,613 total)