October 12, 2010 at 4:16 am
lukus_g (10/12/2010)
Hugo Kornelis, you are a ninja!
True! Well, except for the trendy clothes, the superior stealth, the extreme strength and endurance, the ability to kill without getting killed or caught, and the generic sheer awesomeness of course.:-D
But thanks anyway!:-)
October 12, 2010 at 6:54 am
Interesting question. Good follow on discussion.
October 12, 2010 at 7:16 am
This question completely wasted my time. It serves little use to anybody.
October 12, 2010 at 7:31 am
I felt it was worth two points , sure stumped me.
Make you think outside the box.
Thank you
October 12, 2010 at 7:55 am
October 12, 2010 at 7:59 am
I just think it's hilareous what the SQL 2008 intellisense looks like (newline characters and all) when you perform a select against this 'table':
select dbo.[VarArray[]](i int)
GO
begin tran
insert into VarArray(i) select 1;
print 1;
rollback
GO
while(1=1)].print_i
from dbo.[VarArray[]](i int)
GO
begin tran
insert into VarArray(i) select 1;
print 1;
rollback
GO
while(1=1)]
What a strange question... My first impression was that this was done by mistake when trying to use VARARRAY from Oracle (or someone was testing to see if VARARRAY was valid in that version of SQL Server).
October 12, 2010 at 8:04 am
You are right. The parser in SSMS 2008 is a little different from 2005. The table name has the actual insert statement in it and then some. I wasted 20-30 minutes trying to get it to work like the posted answer.
October 12, 2010 at 9:10 am
Hugo, thank you for your explanation. I was totally confused by the square brackets.
October 12, 2010 at 10:41 am
I thought the ending ] was a typo, it just didn't make sense with it there 🙂
October 12, 2010 at 10:49 am
I think I wasted 15 min of my time today on this question learning nothing new, thanks Hugo for taking the time to explain the delimiter concepts.
October 12, 2010 at 12:13 pm
Interesting question with totally useless (or worse than that) explanation.
Thank heavens for Hugo's clear and simple explanation!
Tom
October 12, 2010 at 1:36 pm
Dogpile on Carlo. Give him a dutch rub. 😉
October 12, 2010 at 3:17 pm
First time I've ever joined a QOTD discussion. In almost 10 years on the site this must be the worst QOTD yet. I quite regularly get them wrong as I am a part time user of SQL Server now days having got promoted to PM roll. I enjoy the learnings and encourage my teams to spend time on the forums and to always do the QOTD. Well this one is a total waste of time as it is a situation that will NEVER occur in a real world situation. I know that it is voluntary to submit a question and there are probalby times when only one is submitted ut I would prefer to have no QOTD that ones as bad as this.
October 12, 2010 at 6:15 pm
dogramone (10/12/2010)
First time I've ever joined a QOTD discussion.
No, there have been far worse. At least in this one the answer was not wrong. And for irrelevance to real work - one QoTD that I set beats this one for irrelevance (and Hugo quite properly and politely pointed out its irrelevance).
Tom
October 12, 2010 at 9:28 pm
That was a realy trick question. Thank you Hugo for the explanation. I had to read it twice, but I finaly got it... Sure I know how a ] works now!
Viewing 15 posts - 16 through 30 (of 44 total)
You must be logged in to reply to this topic. Login to reply