Viewing 15 posts - 4,456 through 4,470 (of 7,613 total)
I don't have any sample data, so I can't possibly test the code first. If I had data, I would have tested it first.
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".
January 27, 2016 at 7:53 am
Jeff Moden (1/26/2016)
Manic Star (1/26/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".
January 27, 2016 at 7:47 am
Luis Cazares (1/26/2016)
Manic Star (1/26/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".
January 26, 2016 at 3:29 pm
I'd strongly urge you to avoid the INFORMATION_SCHEMA views. Instead, stick to the sys. views.
Not only are I_S views deficient in newer columns vs. the system tables, they are...
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".
January 26, 2016 at 3:24 pm
Here's the clear version of the code:
IF (@phrase_type IS NULL OR @phrase_type = ' ')
Instead, the original code uses:
IF (ISNULL(@phrase_type, ' ') = ' ')
The ISNULL(<value1>, <value2>) will replace a...
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".
January 26, 2016 at 2:46 pm
The consultant indicated they usually advice to take a full backup at night and an incremental backup during lunch time (kicking everybody out of the system).
I guess this...
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".
January 26, 2016 at 2:20 pm
If all you need is a count, don't insert rows into a table variable, just get the count directly:
SELECT@QCount = COUNT(*)
FROMtbl_Q_Tags_Map M
JOINtbl_Q Q ON M.QID=Q.QID
WHERETagID IN (SELECT Token FROM @TokenTable)...
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".
January 26, 2016 at 2:06 pm
Sergiy (1/25/2016)
ScottPletcher (1/25/2016)
Sergiy (1/25/2016)
MMartin1 (1/25/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".
January 25, 2016 at 4:23 pm
Sergiy (1/25/2016)
MMartin1 (1/25/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".
January 25, 2016 at 12:22 pm
GilaMonster (1/22/2016)
SQL Guy 1 (1/22/2016)
They agreed with second option, but with condition that the "dirty" records will be marked somehow in the report. So they conditionally accept it.
Nice idea,...
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".
January 22, 2016 at 10:35 am
My best guess at the code, known as a "cross tab" query, is below. You're not using anything from table B in the code. Are these really 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".
January 21, 2016 at 7:00 pm
Is the ETL process working in such a way that it gets a table lock? If so, you may be able to remove the table lock and accept that...
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".
January 21, 2016 at 6:54 pm
SumonB (1/20/2016)
What if today's date is 5th January' 2016.Will it show the start date as 21st December'2015 and End date as 5th January'2016
Yes ... and here's the proof:
Declare @StartDate Datetime,
...
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".
January 20, 2016 at 11:00 am
If you always need exactly 15 days, just do this:
Declare @StartDate Datetime,
@EndDate Datetime
set @EndDate=DATEADD(DAY, DATEDIFF(DAY, 0, GETDATE()), 0) --strip time from date
set @StartDate = DATEADD(DAY, -15,...
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".
January 20, 2016 at 10:21 am
Orlando Colamatteo (1/20/2016)
ScottPletcher (1/20/2016)
Orlando Colamatteo (1/19/2016)
ScottPletcher (1/19/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".
January 20, 2016 at 8:31 am
Viewing 15 posts - 4,456 through 4,470 (of 7,613 total)