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 3397352
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T04:31:05+00:00 2026-05-18T04:31:05+00:00

whats the best way to handle a complex param in a stored proc? let

  • 0

whats the best way to handle a complex param in a stored proc?

let me explain a little about the param so its clear what i am trying to do here…

I have a project management app – so i have things like a release, a project and milestones.
A project has a single release and a release has its milestones.

i am adding reporting and need to generate a report that allows users to select any number of releases and any milestones of a release. this will result in a report that shows all the projects that are part of the release and their data for the milestones selected.

since each release has multiple milestones (milestone table) to keep the associations of what milestone was selected in what release i was thinking to have coma separated list like this to pass the UI data to SQL.

release1 | m2, m3, m4
release2 | m2, m7
release3 | m5

as a varchar or maybe xml…

whats the best practice for sending in something like this that has relational data built into the param? am i way off and over thinking the problem?

please tell me there is a simple solution i am not seeing…

  • 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-18T04:31:06+00:00Added an answer on May 18, 2026 at 4:31 am

    XML would be the best way and simplest with least amount of code… see a sample below.

    As starter sample:

    DECLARE @Param XML
    SET @Param = '
    <chriteria>
          <release id="1">
                <milestone id="1" />
                <milestone id="2" />
                <milestone id="3" />
          </release>
          <release id="2">
                <milestone id="1" />
                <milestone id="2" />
          </release>
    </chriteria>
    '
    
    SELECT c.value('../@id', 'INT') AS ReleaseId, c.value('@id', 'INT') AS MilestoneId
    FROM @Param.nodes('/chriteria/release/milestone') AS T(c)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to understand whats the best way to handle exceptions in Multicast
I'm trying to figure out what the best way to handle a JSON object
I would like to know whats the best way to handle org.springframework.dao.EmptyResultDataAccessException in my
What's the best way to handle an expired password in an ASP.NET MVC application?
What's the best way to handle memory management with nested factory methods, such as
What is the best way to handle unexisting actions in the Zend Framework? Depending
What is the best way to handle multiple Flex/Bison parsers inside a project? I
What is the best way to handle mysql database users connection in PHP? I
What is the best way to handle following situation? A dropdown(for master table) is
What is the best way to handle browser-specific CSS file loading? Assume you are

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.