May 15, 2017 at 8:35 pm
Comments posted to this topic are about the item Batch Preceding
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This thing is addressing problems that dont exist. Its solution-ism at its worst. We are dumbing down machines that are inherently superior. - Gilfoyle
May 15, 2017 at 11:07 pm
Nice simple question to start the day, thank you Henrico, always good to be reminded of the basics.
...
May 16, 2017 at 3:01 am
Simple enoough, but the fact that the newly created stored procedure will fail if it's ever called is an amusing distraction.
I'm quite suurprised that 25% of answers so far have been wrong.
Tom
May 16, 2017 at 4:37 am
Assuming XPCmdShellEnable = True?
:hehe:
May 16, 2017 at 5:51 am
I answered correctly, but for me there were too many assumptions.
May 16, 2017 at 6:13 am
TomThomson - Tuesday, May 16, 2017 3:01 AMSimple enoough, but the fact that the newly created stored procedure will fail if it's ever called is an amusing distraction.I'm quite suurprised that 25% of answers so far have been wrong.
Hi Tom, why do you say it would fail? I am using this method with no issues (assuming xp_cmdshell is enabled).
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
This thing is addressing problems that dont exist. Its solution-ism at its worst. We are dumbing down machines that are inherently superior. - Gilfoyle
May 16, 2017 at 8:17 am
Editor: I'm not really sure how to reword this. The question and structure doesn't really make sense.
FWIW: The question and structure made sense to me. Other that a minor typo in the first answer option, I don't see a need to reword anything.
May 16, 2017 at 8:24 am
This would be a good interview question.
May 16, 2017 at 11:00 am
Henrico Bekker - Tuesday, May 16, 2017 6:13 AMTomThomson - Tuesday, May 16, 2017 3:01 AMSimple enoough, but the fact that the newly created stored procedure will fail if it's ever called is an amusing distraction.I'm quite suurprised that 25% of answers so far have been wrong.
Hi Tom, why do you say it would fail? I am using this method with no issues (assuming xp_cmdshell is enabled).
Just me being utterly dozy or - I think the double quotation marks (which are totally unneeded but actually harmless: there are no spaces at all in the command string, let alone spaces that would require double quotes to allow them) probably made me write that, can't see anything else it might have been.
Tom
May 16, 2017 at 11:02 am
It made complete sense to me as well. Of course, the caller would have to have proper privs to execute it, but the question itself made sense.
May 16, 2017 at 11:06 am
TomThomson - Tuesday, May 16, 2017 11:00 AMHenrico Bekker - Tuesday, May 16, 2017 6:13 AMTomThomson - Tuesday, May 16, 2017 3:01 AMSimple enoough, but the fact that the newly created stored procedure will fail if it's ever called is an amusing distraction.I'm quite suurprised that 25% of answers so far have been wrong.
Hi Tom, why do you say it would fail? I am using this method with no issues (assuming xp_cmdshell is enabled).
Just me being utterly dozy or - I think the double quotation marks (which are totally unneeded but actually harmless: there are no spaces at all in the command string, let alone spaces that would require double quotes to allow them) probably made me write that, can't see anything else it might have been.
It is syntactically correct, but I see what you're saying. They aren't needed around the command itself, but I know some people include them everywhere to be safe. They do have to be right; I've seen people get caught by blindly enclosing the whole thing in quotes, including the parameters. Personally, I use them when necessary and skip them when they're not necessary.
May 17, 2017 at 1:46 am
Trick for me,but got it.
“When I hear somebody sigh, ‘Life is hard,’ I am always tempted to ask, ‘Compared to what?’” - Sydney Harris
May 17, 2017 at 3:19 am
Nice question, thanks Henrico
____________________________________________
Space, the final frontier? not any more...
All limits henceforth are self-imposed.
“libera tute vulgaris ex”
May 17, 2017 at 9:15 am
It boils down to 'go'. Thanks, Henrico!
Viewing 14 posts - 1 through 13 (of 13 total)
You must be logged in to reply to this topic. Login to reply