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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T02:41:02+00:00 2026-06-07T02:41:02+00:00

I have a column of data I need to replicate X times side by

  • 0

I have a column of data I need to replicate X times side by side, randomized. The randomization is for a survey to be fielded where the list is jumbled for unbiased selection and doing it by hand would take quite a long time.

I am newer to SQL so please bear with me. With my limited knowledge, here’s how I would think the query should work.

SELECT MAKEMODEL, (SELECT MAKEMODEL FROM BWMM ORDER BY NEWID())
FROM BWMM
ORDER BY NEWID()

Essentially this would give me something like this

A E 
B D 
C B 
D A
E C

You get the idea. I appreciate any feedback or direction you can give me.

PS: Conceptually, its a lot like this post regarding a VBA solution to a similar question Randomize Columns

  • 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-07T02:41:04+00:00Added an answer on June 7, 2026 at 2:41 am
    WITH
      set_a
    AS
    (
      SELECT ROW_NUMBER() OVER (ORDER BY NEWID()) AS rand_id, * FROM BWWM
    )
    ,
      set_b
    AS
    (
      SELECT ROW_NUMBER() OVER (ORDER BY NEWID()) AS rand_id, * FROM BWWM
    )
    SELECT
      *
    FROM
      set_a
    INNER JOIN
      set_b
        ON set_a.rand_id = set_b.rand_id
    

    You don’t actually need to randomise the order of both sets. If one is random, the pairing is random. In which case one set can be ordered by the primary key of your table (for the fastest way to generate a sequential id).

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

Sidebar

Related Questions

I have datatable with column name tag and 100 rows of data.I need to
I have a User_Id column with data DOMAIN\USERID I need it to be DOMAIN\userid
I have a table of data that I need to dynamically add a column
I need to get some data from a column. For example I have data
I need distinct records by mouth, but I have a error: Column data does
I have a .csv file containing 3 columns of data. I need to create
I have data with no relation. Just need to count various columns from 3
I have a column of name, varchar(200). In this column data can be filled
If I have a table column with data and create an index on this
I have a column that has the following data: PersonId=315618 LetterId=43 MailingGroupId=1 EntityId=551723 trackedObjectId=9538

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.