April 15, 2016 at 3:07 pm
Phil Parkin (4/15/2016)
GilaMonster (4/15/2016)
Phil Parkin (4/15/2016)
Anyone have a crystal ball, several hours to kill and feeling masochistic? Dive in!I'm going to have to steal "Don't have a clue how to optimize this due to some limitations"
I'm going to try that 'limitations' ruse on upper management here. Wish me luck.
Fear that it might be WITH (NOLUCK)
😎
April 15, 2016 at 3:16 pm
Eirikur Eiriksson (4/15/2016)
Phil Parkin (4/15/2016)
GilaMonster (4/15/2016)
Phil Parkin (4/15/2016)
Anyone have a crystal ball, several hours to kill and feeling masochistic? Dive in!I'm going to have to steal "Don't have a clue how to optimize this due to some limitations"
I'm going to try that 'limitations' ruse on upper management here. Wish me luck.
Fear that it might be WITH (NOLUCK)
😎
Yep. Think I might be heading into the
CATCH emp as exception
--Defenestration time
THROW emp;
END CATCH
block.
April 15, 2016 at 3:18 pm
Sean Lange (4/15/2016)
Eirikur Eiriksson (4/15/2016)
Ed Wagner (4/15/2016)
Greg Edwards-268690 (4/15/2016)
Eirikur Eiriksson (4/15/2016)
jeff.mason (4/15/2016)
Eirikur Eiriksson (4/15/2016)
Phil Parkin (4/15/2016)
Anyone have a crystal ball, several hours to kill and feeling masochistic? Dive in!Quick fix in three steps
1. Drop procedure
2. Drop developer
3. Create developer
😎
Do 2 and 3 in one step as an IF EXISTS. In this case the IF clause will fail and it will be able to create the developer.
You are absolutely right, thank you for the correction 😀
😎
I can see a much better execution plan being generated already.
I like how the OP in that thread had no execution plan due to limitations, but there were no issues with it. :w00t:
Just another PICNIC
😎
hehe I like that better than mine. I have always called that a PEBKAC - Problem exists between keyboard and chair.
Call them Wetware bugs, Layer 8 problems, ID-Ten-T errors (ID10T/One Delta Ten Tango), those are the things that makes fool proofing a system impossible because there will always be better fools.
😎
April 15, 2016 at 3:19 pm
Phil Parkin (4/15/2016)
Eirikur Eiriksson (4/15/2016)
Phil Parkin (4/15/2016)
GilaMonster (4/15/2016)
Phil Parkin (4/15/2016)
Anyone have a crystal ball, several hours to kill and feeling masochistic? Dive in!I'm going to have to steal "Don't have a clue how to optimize this due to some limitations"
I'm going to try that 'limitations' ruse on upper management here. Wish me luck.
Fear that it might be WITH (NOLUCK)
😎
Yep. Think I might be heading into the
CATCH emp as exception
--Defenestration time
THROW emp;
END CATCH
block.
Looks like you have introduced a NOCATCH block for the emp;
😎
April 18, 2016 at 6:12 am
So I'm having a VS problem since 2014 that I have never gotten an answer on. And it's getting incredibly frustrating at this point. Can anyone help me over here:
http://www.sqlservercentral.com/Forums/Topic1603285-23-1.aspx
April 18, 2016 at 6:13 am
Eirikur Eiriksson (4/15/2016)
Brandie Tarvin (4/15/2016)
Eirikur Eiriksson (4/15/2016)
jeff.mason (4/15/2016)
Eirikur Eiriksson (4/15/2016)
Phil Parkin (4/15/2016)
Anyone have a crystal ball, several hours to kill and feeling masochistic? Dive in!Quick fix in three steps
1. Drop procedure
2. Drop developer
3. Create developer
😎
Do 2 and 3 in one step as an IF EXISTS. In this case the IF clause will fail and it will be able to create the developer.
You are absolutely right, thank you for the correction 😀
😎
USE MyWorkplace;
GO
IF (SELECT Name FROM sys.objects
WHERE Name = ProcName) IS NOT NULL
DROP DATABASE MyWorkPlace;
IF (SELECT Name FROM sys.server_principals
WHERE Name = 'Developer') IS NOT NULL
BEGIN
DELETE FROM sys.server_principals
WHERE Name = 'Developer';
DELETE FROM HR.Paperwork
WHERE Name = 'Developer';
DELETE FROM Building.Security
WHERE Name = 'Developer';
DROP ENTITY Developer;
END
IF (SELECT Name FROM sys.server_principals
WHERE Name = 'Developer') IS NULL
CREATE ENTITY Developer
(DeveloperName VARCHAR(100),
Intelligence INT,
Curiosity INT,
SQLSkills BIT CONSTRAINT DF_HasSQLSkills DEFAULT 1,
--DBA NOTE to HR: where 1 is True and 0 is False
MadCodingSkillz CONSTRAINT DF_Is733T DEFAULT 1,
GeekCreds INT);
[/code]
Further on Luis's good advice, change
USE MyWorkplace;
GO
to
USE master;
GO
otherwise you'll get the error
Msg 3702, Level 16, State 3, Line 6
Cannot drop database "MyWorkplace" because it is currently in use.
😎
The error was kind of the point to the code given how we were discussing clueless Devs.
But apparently the joke didn't translate well.
April 18, 2016 at 8:05 am
BWFC (4/15/2016)
Steve Jones - SSC Editor (4/15/2016)
Eirikur Eiriksson (4/15/2016)
Steve Jones - SSC Editor (4/15/2016)
About to head off to SQL Saturday Phoenix. Anyone else going?Wouldn't mind to go even if it was only for the 20-30C
😎
BTW when you come over for the Bits, bring warm clothes, someone forgot to tell the weather that it's spring now.
Not sure what to pack. It's warm in the Valley of the Sun, but supposed to be a blizzard in Denver tomorrow. I return late Sat, so leaving a ski coat in the car.
I'm only down the road from SQL Bits and we've got snow forecast for overnight. Admittedly it's only going to be a light dusting but it's April!
This morning
April 18, 2016 at 8:19 am
Steve, I heard there was more snow due today. Is true?
April 18, 2016 at 8:42 am
Brandie Tarvin (4/18/2016)
Eirikur Eiriksson (4/15/2016)
Brandie Tarvin (4/15/2016)
Eirikur Eiriksson (4/15/2016)
jeff.mason (4/15/2016)
Eirikur Eiriksson (4/15/2016)
Further on Luis's good advice, change
USE MyWorkplace;
GO
to
USE master;
GO
otherwise you'll get the error
Msg 3702, Level 16, State 3, Line 6
Cannot drop database "MyWorkplace" because it is currently in use.
😎
The error was kind of the point to the code given how we were discussing clueless Devs.
But apparently the joke didn't translate well.
Your joke translated perfectly, it's my response that got lost in tranlsation;-)
😎
April 18, 2016 at 8:43 am
Steve Jones - SSC Editor (4/18/2016)
BWFC (4/15/2016)
Steve Jones - SSC Editor (4/15/2016)
Eirikur Eiriksson (4/15/2016)
Steve Jones - SSC Editor (4/15/2016)
About to head off to SQL Saturday Phoenix. Anyone else going?Wouldn't mind to go even if it was only for the 20-30C
😎
BTW when you come over for the Bits, bring warm clothes, someone forgot to tell the weather that it's spring now.
Not sure what to pack. It's warm in the Valley of the Sun, but supposed to be a blizzard in Denver tomorrow. I return late Sat, so leaving a ski coat in the car.
I'm only down the road from SQL Bits and we've got snow forecast for overnight. Admittedly it's only going to be a light dusting but it's April!
This morning
Yup, this outfit will do perfectly for the Bits
😎
April 18, 2016 at 9:10 am
No more snow here, at least not forecast. It's cloudy, and foggy. Never know. I think weather forecasters are flipping coins half the time.
April 18, 2016 at 9:13 am
Steve Jones - SSC Editor (4/18/2016)
No more snow here, at least not forecast. It's cloudy, and foggy. Never know. I think weather forecasters are flipping coins half the time.
Just to the East we are incredibly grateful for some precipitation. It has been...well I don't know but at least 2-3 months since we have had any kind of significant precipitation. We are so dry around here. Of course you got snow, we are now getting rain.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
April 18, 2016 at 9:32 am
Sean Lange (4/18/2016)
Steve Jones - SSC Editor (4/18/2016)
No more snow here, at least not forecast. It's cloudy, and foggy. Never know. I think weather forecasters are flipping coins half the time.Just to the East we are incredibly grateful for some precipitation. It has been...well I don't know but at least 2-3 months since we have had any kind of significant precipitation. We are so dry around here. Of course you got snow, we are now getting rain.
It's been so dry here as well. Glad to be getting something.
April 18, 2016 at 10:35 am
Steve Jones - SSC Editor (4/18/2016)
No more snow here, at least not forecast. It's cloudy, and foggy. Never know. I think weather forecasters are flipping coins half the time.
Couple weeks ago, I read an article, an interview with a meteorologist about forecasting the weather and other odd facts about their jobs. He stated that any prediction more than about 5 days out was pure guesswork. 2-3 days out, they're fairly reliable, 3-5 days it's getting iffy, 5+ days, don't make plans based on the forecast...
April 18, 2016 at 10:45 am
jasona.work (4/18/2016)
Steve Jones - SSC Editor (4/18/2016)
No more snow here, at least not forecast. It's cloudy, and foggy. Never know. I think weather forecasters are flipping coins half the time.Couple weeks ago, I read an article, an interview with a meteorologist about forecasting the weather and other odd facts about their jobs. He stated that any prediction more than about 5 days out was pure guesswork. 2-3 days out, they're fairly reliable, 3-5 days it's getting iffy, 5+ days, don't make plans based on the forecast...
My twin brother is a meteorologist and he says the same, up to 72 hours is normally fine and then you can start to reach for a coin to toss. I think when they are doing longer term forecasts they rely on us not remembering what the forecast was when we finally get there:-D
😎
Viewing 15 posts - 53,596 through 53,610 (of 66,815 total)
You must be logged in to reply to this topic. Login to reply