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

The Archive Base Latest Questions

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

I have two SQL tables with data that I would like to compare. The

  • 0

I have two SQL tables with data that I would like to compare. The tables have the following structures:

id, title,url

I want to compare the tables by title where if the strings are similar or equal it would be noted by writing the records to a file. Someone suggested not doing it in SQL and copying the data and using it in .net as lists to compare.

Any suggestions on how to do this?

a typical example for title:

Table 1 – KPTH Fox 44 via

Table 2 – KPTH Fox44

I tried using LIKE in sql with wildcard ‘%’ but his only works for these type of examples and wont work on

ABC

MSabC

  • 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-16T11:14:54+00:00Added an answer on May 16, 2026 at 11:14 am

    This would be way easier to do it in the DB and then return the dataset of items that match. Assuming the two tables are identical and you are matching on just title your SQL would look like:

    SELECT [id], [title], [url]
    FROM [Table1] t1
    JOIN [Table2] t2 ON t1.[title] = t2.[title]
    

    Then iterate through each record in the result set and write whatever fields you want to a file.

    If you want to just stick to SQL, you could run the query and then just save the outout to a file using a query tool for your DB like Management Studio or something.

    EDIT: Based on the ‘similar’ requirement you could use the SOUNDEX command in SQL to compare if they sound similar. See MSDN for more info regarding the SOUNDEX command.

    EDIT 2: To add more information with respect to you added requirements: In SQL this similar requirment might be difficult. You could parse the title into words and then store them into a temp table and see how many match up and then based on a threshhold to assign a match condition. It looks like your data also stores a URL so you could possibly use this as well and check to the base URL to see if they match first before doing the weighted title check. I am not totally clear what outcome you are looking for other than the title.

    It’s really not a very simple task that I think someone will be able to just give you an answer. I am sure a prof at a university is working on this problem though.

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

Sidebar

Ask A Question

Stats

  • Questions 512k
  • Answers 512k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Like any other website. Just make sure you use an… May 16, 2026 at 5:34 pm
  • Editorial Team
    Editorial Team added an answer Separately compute the vertical and horizontal scaling required, then choose… May 16, 2026 at 5:34 pm
  • Editorial Team
    Editorial Team added an answer Your easiest options are to use the carriage return without… May 16, 2026 at 5:34 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

Ok, I have two tables that I am joining and doing a select on
I have two tables with 10-20 million rows that have GUID primary keys and
I have two tables with a 1:n relationship: "content" and "versioned-content-data" (for example, an
I have two tables. Widgets, which has information about each widget (Color, size, etc);
I have two lists of two different kinds of objects representing data rows from
I have a sql table and I have a column which includes data such
I'm inexperienced with sql in general, so using Hibernate is like looking for an
I have a simple question that keeps me up all night :( . Suppose
I have to delete some table data in prod. db and for the records
I am working on SQL Server 2005. I have took the backup and restore

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.