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

  • Home
  • SEARCH
  • 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 6178143
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T00:24:37+00:00 2026-05-24T00:24:37+00:00

Comparing two sql values that are almost the same. I know this is simple

  • 0

Comparing two sql values that are almost the same.

I know this is simple but I can’t think how to do it

I want to do a join or a “select where = ” on two values in two tables.
Problem is one table has a filname with an extension and the other has the filename without the extension. I want to ignore the extension and just do my compare.
How would I do that?

I have something simple like this.

select thing1, thing2
where tableName.filename=tableName2.fileName
from tableName,tableName2
  • 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-24T00:24:38+00:00Added an answer on May 24, 2026 at 12:24 am

    Please don’t use a multi-part from clause. Use the join syntax instead.

    Assuming tableName has the extension and tableName2 does not:

    select
        thing1,
        thing2
    
    from tableName tn
    
    join tableName2 tn2 on tn.fileName like tn2.fileName + '.%'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know that == has some issues when comparing two Strings . It seems
I'm comparing between two techniques to create partitioned tables in SQL 2005. Use partitioned
When comparing two objects (of the same type), it makes sense to have a
I am comparing two almost identical folders which include hidden .svn folders which should
Comparing two images to see if they are both the same files is easy:
I'm comparing two DateTime objects (at least I think I am, they look slightly
I want to combine two LambdaExpressions without compiling them. This is what it looks
I need help with comparing two files in makefile. I need something like this:
Possible Duplicate: comparing two strings with comma seperated values I am working in C++,
how can i delete from table A while comparing two fields A.P and A.C

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.