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 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

Comparing two codes below,both do the same,but with slighty differences: ALTER procedure [dbo].[SP_USUARIOS_UPDATE] @usu_ds
I'm comparing between two techniques to create partitioned tables in SQL 2005. Use partitioned
I am comparing two almost identical folders which include hidden .svn folders which should
I want to cach input, which seems to be like SQL injection. I know
hello i got a problem with comparing two char* variables that contains numbers for
I'm comparing two DateTime objects (at least I think I am, they look slightly
When comparing two strings in c# for equality, what is the difference between InvariantCulture
What's the best algorithm for comparing two arrays to see if they have the
From http://projecteuler.net/index.php?section=problems&id=99 Comparing two numbers written in index form like 2 11 and 3
I am comparing the two base classes of each namespace and am a bit

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.