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


Passing Tables as Parameters


Passing Tables as Parameters

Author
Message
dwain.c
dwain.c
SSC-Dedicated
SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)

Group: General Forum Members
Points: 39255 Visits: 6431
First I'd like to thank everybody that stopped by and left some kind feedback on the question.

Second, I'd like to apologize for not saying the above sooner but I've been kind of busy the last few days here preparing a customer demo.

Third, I've checked and found that Steve kindly fixed the issue with the last line of DROPs/GO, so hopefully that won't be confusing anybody else!

Thanks Steve!


My mantra: No loops! No CURSORs! No RBAR! Hoo-uh!

My thought question: Have you ever been told that your query runs too fast?

My advice:
INDEXing a poor-performing query is like putting sugar on cat food. Yeah, it probably tastes better but are you sure you want to eat it?
The path of least resistance can be a slippery slope. Take care that fixing your fixes of fixes doesn't snowball and end up costing you more than fixing the root cause would have in the first place.


Need to UNPIVOT? Why not CROSS APPLY VALUES instead?
Since random numbers are too important to be left to chance, let's generate some!
Learn to understand recursive CTEs by example.
Splitting strings based on patterns can be fast!
My temporal SQL musings: Calendar Tables, an Easter SQL, Time Slots and Self-maintaining, Contiguous Effective Dates in Temporal Tables
marlon.seton
marlon.seton
SSCommitted
SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)

Group: General Forum Members
Points: 1543 Visits: 319
dwain.c (3/24/2013)
kapil_kk (3/24/2013)
This wil also give error :
DROP FUNCTION dbo.Test DROP TYPE dbo.MyTable GO
as GO is present at the same line where it should not be....
Alas I got wrong w00t


I'll refer you back to my answer to Tom's post just a little ways back.

Clearly that last line should appear as:


DROP FUNCTION dbo.Test
DROP TYPE dbo.MyTable
GO




I have requested Steve to fix it if he can. Hopefully it won't confuse too many others.


It appeared as three separate lines when I read it to-day (28th March) so it may have been fixed.
marlon.seton
marlon.seton
SSCommitted
SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)

Group: General Forum Members
Points: 1543 Visits: 319
dwain.c (3/26/2013)
First I'd like to thank everybody that stopped by and left some kind feedback on the question.

Second, I'd like to apologize for not saying the above sooner but I've been kind of busy the last few days here preparing a customer demo.

Third, I've checked and found that Steve kindly fixed the issue with the last line of DROPs/GO, so hopefully that won't be confusing anybody else!

Thanks Steve!


and then I saw this so I would say, yes, it has been fixed.
Dineshbabu
Dineshbabu
SSCommitted
SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)

Group: General Forum Members
Points: 1802 Visits: 569
Nice question.

--
Dineshbabu
Desire to learn new things..
manik_anu
manik_anu
Ten Centuries
Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)Ten Centuries (1K reputation)

Group: General Forum Members
Points: 1004 Visits: 319
Dineshbabu (4/1/2013)
Nice question.


+1


Manik
Go Fast As Possible...

Manik
You cannot get to the top by sitting on your bottom.
sqlnaive
sqlnaive
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: 10157 Visits: 2774
Good question.
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