Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6758799
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T13:50:43+00:00 2026-05-26T13:50:43+00:00

I am building up a dataset from SQL server – a stored procedure that

  • 0

I am building up a dataset from SQL server – a stored procedure that returns a dataset. It takes several passes to manipulate the data how I need it. I did this previously in a T-SQL stored proc, but it is getting too complex, so I am moving to SQL CLR. In T-SQL, i had several table variables

declare @theData as ( col1 int, .... )

and I ended with a select statement that joined these tables. In SQL CLR, I could instead have a list of objects:

List<MyObject> theData = new List<MyObject>();

The question: Would it be better practice to use the table variables or a .NET collection of objects?

I could see you’re not building up things IN MEMORY using table variables, rather the work is being done on the SQL server. Syntactically it wouldn’t matter to me because I could do “batch update” statements using Linq or SQL.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T13:50:43+00:00Added an answer on May 26, 2026 at 1:50 pm

    If you can use the table variables, CTEs, etc to return the data you need I would stick with that. Using CLR is great if you need to utilize managed code features (think object features) but can be overkill if you don’t really need to use it. You can look at this for an overview: http://msdn.microsoft.com/en-us/library/ms131045.aspx.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to work with data that I get from a SQL Server database
I'm not an expert with either System.Data nor SQL Server, but have a need
I have a report that needs to get data from two logical areas of
I am currently building a method that takes an object that is of type
I'm building an app that contains a listview that is populated from a database
I am building an R function to plot a few lines from a data
I am building a data warehouse. I need to get data from different sources
I am building a demo dataset for my webapp. I would like thousands of
I'm building a webservice which has a webmethod returning a Dataset object. I'm having
building a site using PHP and MySQL that needs to store a lot of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.