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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T07:39:37+00:00 2026-06-12T07:39:37+00:00

This a fairly straightforward issue. I have a value in a MySQL table that

  • 0

This a fairly straightforward issue.

I have a value in a MySQL table that I need to grab and place into a new table. I should also say that this will not denormalize my table as the value being pulled is in a temporary table/row etc.

In any case, this is an example of an attempt I made to do so:

INSERT INTO checkIn(t_id, p_id, checkIn, checkedOut) VALUES(2,11,curdate(), (SELECT checkedTime FROM checkOut WHERE t_id = 2));

As one can see, the value I’m trying to pull from the other table is denoted by the SELECT statement. When it is executed, only the SELECT statement is run – not the insert. Personally, I don’t feel that this is the correct approach to accomplish my goal.

Any insight would be appreciated.

  • 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-06-12T07:39:38+00:00Added an answer on June 12, 2026 at 7:39 am

    don’t use values… do a straight insert like..

    insert into myTable (someNum, someOtherNum, date, someTime) select 2, 11, curdate(), checkedTime  from checkout etc. etc.
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a layout that should be fairly straightforward, but for some unknown reason
I have this fairly straightforward table with ID , Position , Name columns. ID
I have a fairly straightforward set of php forms that take users through a
This is a fairly straightforward question. I have Users in my Rails3 Application. I
I have a fairly straightforward SSIS package where I can't sucessfully pass the value
This seems fairly straightforward, but I cant find an answer. If I have an
I'm a beginner at SQL and have this fairly easy conditional problem: Every installation
Say I am storing addresses in a DB table, in this fairly common break
I know this is fairly subjective, but I'm diving into testing and learning about
I'm sure this is fairly simple, however I have a major mental block on

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.