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


SQL 2K5 - Table-Valued Parameters


SQL 2K5 - Table-Valued Parameters

Author
Message
abmore
abmore
SSCommitted
SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)

Group: General Forum Members
Points: 1555 Visits: 931
Comments posted to this topic are about the item SQL 2K5 - Table-Valued Parameters
OCTom
OCTom
SSCarpal Tunnel
SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)SSCarpal Tunnel (4.1K reputation)

Group: General Forum Members
Points: 4137 Visits: 4152
I'm kind of confused by the question. I thought it was discussing table variables. Maybe it's too early in the day, yet. ;-)
GilaMonster
GilaMonster
SSC Guru
SSC Guru (224K reputation)SSC Guru (224K reputation)SSC Guru (224K reputation)SSC Guru (224K reputation)SSC Guru (224K reputation)SSC Guru (224K reputation)SSC Guru (224K reputation)SSC Guru (224K reputation)

Group: General Forum Members
Points: 224741 Visits: 46321
Table-valued parameters - http://msdn.microsoft.com/en-us/library/bb510489.aspx

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

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


Ken Wymore
Ken Wymore
SSCertifiable
SSCertifiable (6.6K reputation)SSCertifiable (6.6K reputation)SSCertifiable (6.6K reputation)SSCertifiable (6.6K reputation)SSCertifiable (6.6K reputation)SSCertifiable (6.6K reputation)SSCertifiable (6.6K reputation)SSCertifiable (6.6K reputation)

Group: General Forum Members
Points: 6585 Visits: 2396
This is where my lack of experience with SQL 2008 bites me again. I too thought the question was referencing table variables. Good question, I learned something new!
Chris Harshman
Chris Harshman
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10922 Visits: 4669
yep it is too early in the day, I've got to stop answering these before I've had some caffiene ;-)
Kevin Gill
Kevin Gill
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: 1347 Visits: 356
To my mind, this question could/should have been moderated and edited to make it clearer.

Even though I would have got it wrong had it actually been asking what I thought it was, the fact that it was pretty badly written added an additional, unnecessary level of misdirection that just gets in the way.

The 'correct' answer does not in itself actually answer the question - I have no more idea now than I had ten minutes ago whether table VARIABLES in SQL2K5 can be set to NULL, even though I did actually know that you can't have table parameters in SQL 2K5 (as they would have solved a lot of my problems last year). I skimmed the answers, thought 'I know SQL2K5 can have table variables' (I admit - misreading on my part but I assumed that if it was a 'trick' question then that answer would refer to all parts of the question equally, given that there's only single word answers for the other options) and gave some thought to whether a table VARIABLE can be set to NULL or not. I made my choice, got it wrong, but didn't actually find out the answer.

So can table variables be set to NULL? Perhaps this could be added to the explanation...

-------------------------------
Oh no!
Lynn Pettis
Lynn Pettis
SSC Guru
SSC Guru (95K reputation)SSC Guru (95K reputation)SSC Guru (95K reputation)SSC Guru (95K reputation)SSC Guru (95K reputation)SSC Guru (95K reputation)SSC Guru (95K reputation)SSC Guru (95K reputation)

Group: General Forum Members
Points: 95014 Visits: 38963
Kevin Gill (1/15/2010)
To my mind, this question could/should have been moderated and edited to make it clearer.

Even though I would have got it wrong had it actually been asking what I thought it was, the fact that it was pretty badly written added an additional, unnecessary level of misdirection that just gets in the way.

The 'correct' answer does not in itself actually answer the question - I have no more idea now than I had ten minutes ago whether table VARIABLES in SQL2K5 can be set to NULL, even though I did actually know that you can't have table parameters in SQL 2K5 (as they would have solved a lot of my problems last year). I skimmed the answers, thought 'I know SQL2K5 can have table variables' (I admit - misreading on my part but I assumed that if it was a 'trick' question then that answer would refer to all parts of the question equally, given that there's only single word answers for the other options) and gave some thought to whether a table VARIABLE can be set to NULL or not. I made my choice, got it wrong, but didn't actually find out the answer.

So can table variables be set to NULL? Perhaps this could be added to the explanation...



declare @TestTab table (TableID int, TableData varchar(32));
set @TestTab = null;



Result:

Msg 137, Level 15, State 1, Line 2
Must declare the scalar variable "@TestTab".


Cool
Lynn Pettis

For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here or when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here and here
Managing Transaction Logs

SQL Musings from the Desert Fountain Valley SQL (My Mirror Blog)
Kevin Gill
Kevin Gill
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: 1347 Visits: 356
In fact, I'll go further (and you can't stop me ;o))

Whenever I miss the intended point of one of these questions, it's usually because I've not paid attention to the title, or because I've formulated my opinion as to the correct answer based on the version that appears in the daily email. The daily email of course does not include the title, or the answers.

Maybe if (as a minimum) the title of the question were included in the mail, I'd be more likely to know what subtleties to be looking for when I came to the site to answer, rather than just clicking the answer I'd already decided on and then wishing to express my opinions on the same when I believe the question is too much of a 'trick'.*

Anyway I'm done. Like I say, I'm not bothered that I got it wrong, just that it was hard for the wrong reasons.

* A trick question, to clarify my meaning is any question where there are a set of obvious answers (e.g. Yes/No) where the actual answer is none of those, and is a reference to some other subtlety involved in the process - one where you have to read the title and all the answers to know what it's actually asking...

-------------------------------
Oh no!
Kevin Gill
Kevin Gill
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: 1347 Visits: 356
Lynn Pettis (1/15/2010)

declare @TestTab table (TableID int, TableData varchar(32));
set @TestTab = null;



Result:
[quote]
Msg 137, Level 15, State 1, Line 2
Must declare the scalar variable "@TestTab".

Cheers - I could have just tested it :-) but I was too busy writing... And I would have got it right, had it been asking what I believed it to be asking :-)

-------------------------------
Oh no!
Lynn Pettis
Lynn Pettis
SSC Guru
SSC Guru (95K reputation)SSC Guru (95K reputation)SSC Guru (95K reputation)SSC Guru (95K reputation)SSC Guru (95K reputation)SSC Guru (95K reputation)SSC Guru (95K reputation)SSC Guru (95K reputation)

Group: General Forum Members
Points: 95014 Visits: 38963
Kevin Gill (1/15/2010)
In fact, I'll go further (and you can't stop me ;o))

Whenever I miss the intended point of one of these questions, it's usually because I've not paid attention to the title, or because I've formulated my opinion as to the correct answer based on the version that appears in the daily email. The daily email of course does not include the title, or the answers.

Maybe if (as a minimum) the title of the question were included in the mail, I'd be more likely to know what subtleties to be looking for when I came to the site to answer, rather than just clicking the answer I'd already decided on and then wishing to express my opinions on the same when I believe the question is too much of a 'trick'.*

Anyway I'm done. Like I say, I'm not bothered that I got it wrong, just that it was hard for the wrong reasons.

* A trick question, to clarify my meaning is any question where there are a set of obvious answers (e.g. Yes/No) where the actual answer is none of those, and is a reference to some other subtlety involved in the process - one where you have to read the title and all the answers to know what it's actually asking...


When taking a test, particularly a multiple choice (multiple guess, if you prefer) don't you read the entire question and the answers before actually answering the question?

Cool
Lynn Pettis

For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here or when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here and here
Managing Transaction Logs

SQL Musings from the Desert Fountain Valley SQL (My Mirror Blog)
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