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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T05:55:22+00:00 2026-06-04T05:55:22+00:00

I have a question: Does it possible to collect multiple query in one query?

  • 0

I have a question:

Does it possible to collect multiple query in one query?

i.e in a Form I have 10 query like this:

1.  SELECT ThisValue FROM thatTable1 WHERE
2.  SELECT ThisValue FROM thatTable2 WHERE
                 .......
10.      SELECT ThisValue FROM thatTable10 WHERE

where should I write i.e this code in Access.It it possible in Access or only I can do that in MS SQL and….

CREATE PROC dbo.proc_app_CollectControlData
AS
    SET NOCOUNT ON

    DECLARE @t TABLE
    (
      CONTROLNAME   nvarchar(74),
      CONTROLVALUE  nvarchar(255)
    )

    -- Now we collect the data for the 10 different controls
    INSERT INTO @t
    (CONTROLNAME, CONTROLVALUE)
    SELECT 'MyFirstControl',
            ThisValue
    FROM dbo.ThatTable
    WHERE Condition1

    ...

    INSERT INTO @t
    (CONTROLNAME, CONTROLVALUE)
    SELECT 'MyTenthControl',
            ThisValue
    FROM dbo.ThatTable
    WHERE Condition10

    -- And now we return all found data to the client
    SELECT * FROM @
    SET NOCOUNT OFF
GO
  • 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-06-04T05:55:24+00:00Added an answer on June 4, 2026 at 5:55 am

    I think you are looking for the UNION Operator.

    SELECT  'MyFirstControl' AS ControlName, ThisValue AS ControlValue
    FROM    thatTable1 
    WHERE   Condition1 
    UNION ALL
    SELECT  'MySecondControl' AS ControlName, ThisValue AS ControlValue
    FROM    thatTable2
    WHERE   Condition2
    UNION ALL
    SELECT  'MyThirdControl' AS ControlName, ThisValue AS ControlValue
    FROM    thatTable3
    WHERE   Condition3
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've spotted this question: Does Microsoft SkyDrive have an API? But not having an
I have few question in this regard When you create an internet page, does
Or say does 1 denotes white for an RGB image? I have this question
I have quite an uncommon question: Does anyone know whether it is possible to
Possible Duplicate: What does this mean? (function (x,y)){…}){a,b); in JavaScript I have the following
I have a question about the windows invariant culture. Succinctly, my question is: does
Drupal Question: Does anyone have a method of using Views and highlighting a selected/current
Question: Does anyone have an example of a filter as you type dropdown control
Question: Does anyone have a quick way for removing all the extra resources in
Ok, question does not really make sense. Here is the situation. I have legacy

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.