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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T14:56:33+00:00 2026-05-30T14:56:33+00:00

I have a problem with a SQL query. I got the following query working,

  • 0

I have a problem with a SQL query. I got the following query working, which pretty basic:

SELECT *
FROM table1
WHERE Date = CURDATE()

There’s a column in table1 which is called h_id and a table2 with the columns h_id and name

I want to join those two tables so that I have the names out of table 2 from the current date.

I tried this, but it doesn’t seem to work

SELECT t2.name, t1.field2
FROM table1 t1
INNER JOIN table2 t2 ON t1.H_ID = t2.H_ID
WHERE t1.Date = CURDATE( )
  • 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-30T14:56:35+00:00Added an answer on May 30, 2026 at 2:56 pm

    It might be case sensitive.

    or

    does table1 have field2 column?

    If not/so, and according to your question, try it like this:

    SELECT t2.name
    FROM table1 t1
    INNER JOIN table2 t2 ON t1.h_id = t2.h_id
    WHERE t1.Date = CURDATE()
    

    Another possibility is the where clause, try it like this:

    SELECT t2.name
    FROM table1 t1
    INNER JOIN table2 t2 ON t1.h_id = t2.h_id
    WHERE convert(varchar, t1.Date, 112) = convert(varchar, getdate(), 112)
    

    A last possibility is that there isn’t any h_id equal from table1 and table2.

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

Sidebar

Related Questions

I seem to have a problem with this SQL query: SELECT * FROM appts
I have a problem with an SQL query on Postgresql. This select clause is
Having a problem with the following Query. i have a device table which logs
I have the following linq to sql query: DateTime linqdate = (from de in
I have got a native join sub query problem in MySQL Entity. SQL code
i have got a problem with this query. update table1 as a left join
I have a problem that I would like have solved via a SQL query.
I'm new to python and have hit a problem with an SQL query I'm
I have a problem with the SQL statement detailed below. The query returns the
Possible Duplicate: SQL Server Database query help Hi, I have a problem that I

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.