July 22, 2015 at 3:11 pm
Hi what are my options for implementing and using array variables in SQL Server? The app I'm currently working on uses SQL Server 2008 so the array implementation needs to be compatible with SS2008. Out of curiosity, has SS array support improved in any way since 2008?
July 22, 2015 at 3:24 pm
Nope, but you can always make a temp table with an identity column 😀
July 22, 2015 at 3:53 pm
Out of curiosity, has SS array support improved in any way since 2008?
Yep, in 2012 they included CHOOSE.
I never see it used though....
Hmmmm, now I'm curious to how it compares to a temp table variable... something I might play around with:rolleyes:
-- Itzik Ben-Gan 2001
July 22, 2015 at 3:56 pm
I vote for either temp table or table variable.
For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]
July 22, 2015 at 3:59 pm
sqlguy-736318 (7/22/2015)
Hi what are my options for implementing and using array variables in SQL Server? The app I'm currently working on uses SQL Server 2008 so the array implementation needs to be compatible with SS2008. Out of curiosity, has SS array support improved in any way since 2008?
What kind of array are you interested in emulating?
--Jeff Moden
Change is inevitable... Change for the better is not.
July 22, 2015 at 5:25 pm
Alvin Ramard (7/22/2015)
I vote for either temp table or table variable.
Yep.
-- Itzik Ben-Gan 2001
July 23, 2015 at 1:37 pm
But a temp table / table variable won't begin to match the performance of a true array.
SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".
July 23, 2015 at 1:43 pm
ScottPletcher (7/23/2015)
But a temp table / table variable won't begin to match the performance of a true array.
C'est la vie.
For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply