SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Variable Array Table


Variable Array Table

Author
Message
fanningm
fanningm
Forum Newbie
Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)Forum Newbie (4 reputation)

Group: General Forum Members
Points: 4 Visits: 24
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).
jcarsley
jcarsley
SSC Rookie
SSC Rookie (32 reputation)SSC Rookie (32 reputation)SSC Rookie (32 reputation)SSC Rookie (32 reputation)SSC Rookie (32 reputation)SSC Rookie (32 reputation)SSC Rookie (32 reputation)SSC Rookie (32 reputation)

Group: General Forum Members
Points: 32 Visits: 63
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.
Enigma475
Enigma475
SSC Eights!
SSC Eights! (965 reputation)SSC Eights! (965 reputation)SSC Eights! (965 reputation)SSC Eights! (965 reputation)SSC Eights! (965 reputation)SSC Eights! (965 reputation)SSC Eights! (965 reputation)SSC Eights! (965 reputation)

Group: General Forum Members
Points: 965 Visits: 200
Hugo, thank you for your explanation. I was totally confused by the square brackets.
Shriniket
Shriniket
Ten Centuries
Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)

Group: General Forum Members
Points: 1314 Visits: 47
I thought the ending ] was a typo, it just didn't make sense with it there Smile
Shriniket
Shriniket
Ten Centuries
Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)

Group: General Forum Members
Points: 1314 Visits: 47
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.
Tom Thomson
Tom Thomson
One Orange Chip
One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)

Group: General Forum Members
Points: 25383 Visits: 12490
Interesting question with totally useless (or worse than that) explanation.
Thank heavens for Hugo's clear and simple explanation!

Tom

pjdiller
pjdiller
SSC-Addicted
SSC-Addicted (489 reputation)SSC-Addicted (489 reputation)SSC-Addicted (489 reputation)SSC-Addicted (489 reputation)SSC-Addicted (489 reputation)SSC-Addicted (489 reputation)SSC-Addicted (489 reputation)SSC-Addicted (489 reputation)

Group: General Forum Members
Points: 489 Visits: 291
Dogpile on Carlo. Give him a dutch rub. ;-)
dogramone
dogramone
SSC Eights!
SSC Eights! (953 reputation)SSC Eights! (953 reputation)SSC Eights! (953 reputation)SSC Eights! (953 reputation)SSC Eights! (953 reputation)SSC Eights! (953 reputation)SSC Eights! (953 reputation)SSC Eights! (953 reputation)

Group: General Forum Members
Points: 953 Visits: 3827
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.



Tom Thomson
Tom Thomson
One Orange Chip
One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)One Orange Chip (25K reputation)

Group: General Forum Members
Points: 25383 Visits: 12490
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

tilew-948340
tilew-948340
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1133 Visits: 2437
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!
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search