November 16, 2015 at 2:01 pm
Lynn,
That is correct. I've had my email address changed, and I use to one log in from work that was changed at that time and I also use one for home (I get the subscription in both places)
I typically spend 5 to 30 minutes a day on the site. The quality of posts varies considerably. Clearly many of the smartest and most invested people read this thread.
412-977-3526 call/text
November 16, 2015 at 2:05 pm
robert.sterbal 56890 (11/16/2015)
Lynn,That is correct. I've had my email address changed, and I use to one log in from work that was changed at that time and I also use one for home (I get the subscription in both places)
I typically spend 5 to 30 minutes a day on the site. The quality of posts varies considerably. Clearly many of the smartest and most invested people read this thread.
Well then, I am going to tell you are way off base when it comes Gail. She is one of the best on this site and just one of the people I consider a mentor.
November 16, 2015 at 2:09 pm
Lynn,
Asking someone to approach a situation differently doesn't mean that they are doing something wrong, or they aren't one of the best people on the site.
412-977-3526 call/text
November 16, 2015 at 2:16 pm
robert.sterbal 56890 (11/16/2015)
Lynn,Asking someone to approach a situation differently doesn't mean that they are doing something wrong, or they aren't one of the best people on the site.
I say this in the nicest way, you don't know what you are talking about. Again, you should take a few months and read The Thread (another name for this thread) from the beginning.
There are many people who post questions here who want nothing to do with learning, all they want is the answer and just the answer. No suggestions on how to do things better. No wanting to understand what the code is doing. We still try and help these people when we can but it is frustrating when they refuse to help us help them.
November 16, 2015 at 3:02 pm
Lynn Pettis (11/13/2015)
(think government contracted software development).
My scary story when working with the gov't.
Software contract awarded, specified that all data access has to go through stored procedures.
They sent to me for my approval:
CREATE PROCEDURE xyz (
@ColumnList varchar(max),
@From varchar(max),
@Where varchar(max),
@Order varchar(max)
)
AS
declare @command varchar(max);
SET @command = 'SELECT ' + @ColumnList + ' FROM ' + @From;
IF @Where > '' SET @command = @command + ' WHERE ' + @Where;
IF @Order > '' SET @command = @command + ' ORDER BY ' + @Order;
EXECUTE (@command);
GO
Yep, that was the only procedure in the application.
They quickly learned to hate me.
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
November 16, 2015 at 3:58 pm
WayneS (11/16/2015)
Lynn Pettis (11/13/2015)
(think government contracted software development).My scary story when working with the gov't.
Software contract awarded, specified that all data access has to go through stored procedures.
They sent to me for my approval:
CREATE PROCEDURE xyz (
@ColumnList varchar(max),
@From varchar(max),
@Where varchar(max),
@Order varchar(max)
)
AS
declare @command varchar(max);
SET @command = 'SELECT ' + @ColumnList + ' FROM ' + @From;
IF @Where > '' SET @command = @command + ' WHERE ' + @Where;
IF @Order > '' SET @command = @command + ' ORDER BY ' + @Order;
EXECUTE (@command);
GO
Yep, that was the only procedure in the application.
They quickly learned to hate me.
That would be extraordinarily funny if it weren't true. Unfortunately, I have this feeling that you aren't joking.
November 16, 2015 at 4:05 pm
Why go to all that trouble. Dynamically create the entire SQL query in the application and call this proc:
create procedure dbo.QueryDB (
@SQLCmd nvarchar(max)
)
as
set nocount on;
execute sp_executesql @SQLCmd;
set nocoumnt off;
go
November 16, 2015 at 4:36 pm
WayneS (11/16/2015)
Lynn Pettis (11/13/2015)
(think government contracted software development).My scary story when working with the gov't.
Software contract awarded, specified that all data access has to go through stored procedures.
They sent to me for my approval:
CREATE PROCEDURE xyz (
@ColumnList varchar(max),
@From varchar(max),
@Where varchar(max),
@Order varchar(max)
)
AS
declare @command varchar(max);
SET @command = 'SELECT ' + @ColumnList + ' FROM ' + @From;
IF @Where > '' SET @command = @command + ' WHERE ' + @Where;
IF @Order > '' SET @command = @command + ' ORDER BY ' + @Order;
EXECUTE (@command);
GO
Yep, that was the only procedure in the application.
They quickly learned to hate me.
I've seen far worse than that in non-government contexts. With a C++ app using SQL Server 2000 a variant on that theme cropped up (when tearing the app apart and putting it back todether) that had 4 SPs instead of just one - one each to do SELECT, DELETE, INSERT, and UPDATE. Needless to say my remarks were somewhat intemperate (and none of those SPs ended up in the product) but that didn't get me hated - people were used to me telling them that certain things would not be permitted and were happy as long as I explained why they were not a good idea.
Tom
November 16, 2015 at 4:48 pm
Lynn Pettis (11/16/2015)
Why go to all that trouble. Dynamically create the entire SQL query in the application and call this proc:
create procedure dbo.QueryDB (
@SQLCmd nvarchar(max)
)
as
set nocount on;
execute sp_executesql @SQLCmd;
set nocoumnt off;
go
The only reason people did it the other way was probably that they were told they mustn't construct commands in the app, so they obviously have to present chunks smaller than a command to the DBMS.
Besides, including "set nocount on" would probably be beyond their comprehension, until they discovered the effect of not doing it.
Tom
November 16, 2015 at 4:52 pm
Even today I still make rookie mistakes at times. Know the order you need when doing multiple replaces and some of the values you are replacing are embedded in others.
November 17, 2015 at 1:55 am
Brandie Tarvin (11/16/2015)
Lynn Pettis (11/16/2015)
Sorry, got snippy with an OP.50 lashes with a noodle please.
My Patented Wet Noodle <tm> no less. Shame.
EDIT: BTW, I'm teasing you, Lynn.
Oh gosh, how 50 Shades is that? :blush:
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
November 17, 2015 at 1:58 am
robert.sterbal 56890 (11/16/2015)
Gilamonster,I think you have been trying too hard to teach someone without altering your approach if your response is that someone has asked a bad (as in ineffective) question 20 times, and you haven't reached out to them to get them to ask better questions.
Then please, by all means, why don't you show me how to do it, since I'm obviously incapable?
And I never said 'bad/ineffective questions'. I said lack of thought and understanding, lack of research and independent work. Bit of a difference there.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
November 17, 2015 at 2:16 am
From some time yesterday through to the present I've been noticing something a little odd. In the workplace, on the commute home last night (the walk, the tube, the train), on social media last night, on social media this morning, and on the commute back to work (the train, the tube, the walk). And now on ssc too.
The background level of snarkiness is significantly higher than normal. Folks appear to be a little insensitive to one another, a little more selfish, and at the same time a little more sensitive to incoming remarks. I'm guilty, too - an acquaintance "let me go" last night because of something insensitive I posted.
Sure as eggs are eggs it's something to do with the horror of the weekend awakening a seed of survivalism in us all. Please, just be aware of this for the next few days and be extra nice.
Best wishes
ChrisM
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
November 17, 2015 at 3:32 am
Lynn Pettis (11/16/2015)
BrainDonor (11/16/2015)
I've lost count of the number of times I've prepared the material to explain a question, only to have found the answer in doing so.
SSC is my rubber duck.
Those are the type of questions you should still post along with your answer. One, someone else may have a similar issue. Two, you may be surprised and see your solution get tweaked and improved.
Oh I'm never surprised when somebody improves my code!
Embarrassed, possibly.
November 17, 2015 at 4:05 am
BrainDonor (11/17/2015)
Lynn Pettis (11/16/2015)
BrainDonor (11/16/2015)
I've lost count of the number of times I've prepared the material to explain a question, only to have found the answer in doing so.
SSC is my rubber duck.
Those are the type of questions you should still post along with your answer. One, someone else may have a similar issue. Two, you may be surprised and see your solution get tweaked and improved.
Oh I'm never surprised when somebody improves my code!
Embarrassed, possibly.
That's not nearly as embarrassing as not understanding your own code that you wrote a year ago and having some bright young trainee explain it to you.
Tom
Viewing 15 posts - 51,436 through 51,450 (of 66,712 total)
You must be logged in to reply to this topic. Login to reply