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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T14:14:50+00:00 2026-05-16T14:14:50+00:00

lets say I’ve a list of 10 strings (lets just call it str1, str2,

  • 0

lets say I’ve a list of 10 strings (lets just call it “str1”, “str2”, … “str10” etc). I want to be able to generate all pairs from this
(“str1”, “str2”)
(“str1”, “str3”)
.
.
.
etc upto (“str9”, “str10”). That is easy, with two loops. How to do the same thing with a million strings? Is there anyway to put it in a table, and run a query?

  • 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-16T14:14:51+00:00Added an answer on May 16, 2026 at 2:14 pm

    Put them in a table, and use this join:

    Select t1.StringValue, T2.StringValue
    From StringsTable T1
        INNER JOIN StringsTable T2
            ON T1.StringValue <> T2.StringValue
    

    Now, if you run a Million strings in some sort of Query Analyzer / GUI, you’re setting yourself up for some hurt – that’s a huge load of data returned.

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

Sidebar

Related Questions

lets say i've got this array: array = [str1, str2, str3, str4, str5, str6,
Lets say that I have a list list = ['this','is','just','a','test'] how can I have
Lets say I have a field. Lets call it Barcode1. Right now all Barcodes1
Lets say I have a stored proc call MyStoredProc which recieved an int (@MyParam
Lets say i have a method: UpdateObject(IList<MyObject> objs) and i want to use that
Lets say, you have an application, which is consuming up all the computational power.
Lets say I have a list and I am trying to look up a
Lets say that I have 4 view controllers (call them FirstView,SecondView,ThirdView,FourthView) which are created
Lets say that we have a specific string: string a[]={ab,cd,ef} and we want a
Lets say I have several web sites on my web server, all as applications

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.