May 7, 2013 at 12:41 pm
hany.helmy (5/5/2013)
I think the answer is wrong as statement #7 runs succesfully and returns 0 rows & also statements #8 run succesfully and didn`t fail for any reason!!Any explanation dear author?!! :cool:;-)
Run the following as a SINGLE BATCH and tell us what you see in the messages tab:
-- statement #1
print 'Statement 1';
create table #QotD1 (Id int, timestamp timestamp)
-- statement #2
print 'Statement 2';
insert into #QotD1 (Id)
select top 10 id from sys.sysobjects
-- statement #3
print 'Statement 3';
select id, timestamp into #QotD2 from #QotD1
-- statement #4
print 'Statement 4';
select *
from #QotD1 q1
join #QotD2 q2 on q1.timestamp = q2.timestamp
-- statement #5
print 'Statement 5';
delete #QotD2
-- statement #6
print 'Statement 6';
insert into #QotD2 (Id, timestamp)
select id, timestamp from #QotD1
-- statement #7
print 'Statement 7';
select *
from #QotD1 q1
join #QotD2 q2 on q1.timestamp = q2.timestamp
-- statements #8
print 'Statement 8';
drop table #QotD1
drop table #QotD2
May 8, 2013 at 1:41 am
statement #7 runs succesfully and returns 0 rows
May 8, 2013 at 2:04 am
binod.soft (5/8/2013)
statement #7 runs succesfully and returns 0 rows
Not if you execute the entire code block as a single batch (as instructed in the question). The error in statement #6 aborts the batch; statements 7 and 8 are not executed.
May 8, 2013 at 2:34 am
Nice question. Thanks for author for submitting. Please keep posting this type of good questions.
Malleswarareddy
I.T.Analyst
MCITP(70-451)
May 8, 2013 at 7:32 am
Interesting question, thanks for the effort!
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
May 8, 2013 at 5:40 pm
Hugo Kornelis (5/6/2013)
To the many people complaining they "lost" points - you didn't. You still have as many points as you had before, and by wasting yours and other people's time with your whining, you even earned an extra point. (Can someone please give Steve an entry-level book about raising kids? You know, one that explain you should not reward unwanted behaviour?)
Heh... I see that you've gotten several extra points pointing that out. 😉
--Jeff Moden
Change is inevitable... Change for the better is not.
May 16, 2013 at 2:56 am
I was too fast. Lost my points. Good question though.
May 20, 2013 at 1:22 am
Nice question. Had to give lots of time to go through each statement. 🙂
May 20, 2013 at 2:38 am
Hugo Kornelis (5/6/2013)
And finally, to Steve - I know we've discussed this before, and I know it won't happen, but I just have to ask again. Can you please, please, please get rid of that stupid point system. The only effect I see it having is to encourage behaviour that benefits nobody.
What he said.
May 25, 2013 at 2:40 pm
Just to be clear, it's not so much "points" that people value. It's the reported percentage of correct answers that people value because it's one of those things that can look pretty good on a resume.
--Jeff Moden
Change is inevitable... Change for the better is not.
May 26, 2013 at 4:49 am
Jeff Moden (5/25/2013)
Just to be clear, it's not so much "points" that people value. It's the reported percentage of correct answers that people value because it's one of those things that can look pretty good on a resume.
Are you sure about the resume? I don't know as I joined SSC during my recent job and I'm not responsible of employees.
I suppose that minority of HR in our country even heard about SSC.
September 16, 2013 at 5:01 am
Hugo Kornelis (5/6/2013)
What bothers me most about the point system is that it causes some people who feel a question was unfair to respond downright angry, demanding "points back" and stuff. I have no idea how value-less points cause people to expose their dark side in such ways. But I don't like it, and if taking away the points system would rid us of those post, I am all for it.I do maintain that some of the "thank you" posters are, as far as I can see, not sincere. I especially get this feeling when I see a single person post equal-worded "thank you" posts in all topics of the last two weeks, and then does it again in another two weeks. I may be wrong, but it simply does not give me a sincere feeling.
For people who occasionally post a "thank you" after reading a question they like, or if they feel an author deserves to be compensated for an unfair bashing, I have no problem at all. It is not something I myself do very often, but I have no issue with those who do so,
However, just to ensure I am not misunderstood - the main reason why I would like Steve to get rid of the points system is to get rod of the nasty and hostile messages of people who are angry when they miss points.
Well, Hugo, I possibly do understand quite well your motivation to flame a little bit against the point system.
On the other hand, I myself appreciated this point system because I wanted to have proof of my development in the SQL area. And the point system gave me motivation at starters.
Now some days are gone, and I got too impatient watching me still being a "Valued member". I got more interested in the technical aspects of the QotD. And for _me_ it is very valuable to see which people are complaining, which are just writing a "thanx" and which people's articles are worth reading.
Yours definitely are of the latter. So thanx to you, too 😉
________________________________________________________
If you set out to do something, something else must be done first.
Viewing 12 posts - 46 through 56 (of 56 total)
You must be logged in to reply to this topic. Login to reply