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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T01:46:32+00:00 2026-05-23T01:46:32+00:00

So I am trying to insert multiples rows of data from one table to

  • 0

So I am trying to insert multiples rows of data from one table to another. I have done this; however, I am having an issue with some of my columns, specifically my date columns. When the query returns data it is missing the time component of the date which is normally present. If this doesn’t make sense hopefully the follow helps things to make sense.

My original query

SELECT 'insert into dante2 (subcar, batch_id, silicon, temperature, sulphur, manganese, phosphorus, start_pour, end_pour, sched_cast_date) values(',    SUBCAR,',',BBP.BATCH_ID   ,',',   SILICON                 ,',',TEMPERATURE                   ,',',   SULPHUR                 ,',',   MANGANESE                  ,',',   pHOSPHORUS                  ,',''',START_POUR      ,''',''',    END_POUR,''',''',SCHED_CAST_DATE              ,''');'
FROM  bof_chem_sample bcs, bof_batch_pour bbp, bof_celox_sample bofcs 
WHERE bcs.SAMPLE_CODE= to_char('D1')
and bofcs.sample_code=bcs.sample_code
and bofcs.batch_id=bcs.batch_id
and bcs.batch_id = bbp.batch_id
and bofcs.temperature>0
AND bbp.START_POUR>=to_date('01-JAN-11')
order by bbp.start_pour

Results of the query:

insert into dante2 (subcar, batch_id, silicon, temperature, sulphur, manganese, phosphorus, start_pour, end_pour, sched_cast_date) 
  values( 101,65277 ,0.6631,2525 ,0.0551,0.3366,0.043,'01-JAN-11','01-JAN-11','31-DEC-10'); 
insert into dante2 (subcar, batch_id, silicon, temperature, sulphur, manganese, phosphorus, start_pour, end_pour, sched_cast_date) 
  values( 123,65277 ,0.6631,2525 ,0.0551,0.3366,0.043,'01-JAN-11','01-JAN-11','31-DEC-10'); 
insert into dante2 (subcar, batch_id, silicon, temperature, sulphur, manganese, phosphorus, start_pour, end_pour, sched_cast_date) 
  values( 123,65278 ,0.7116,2470 ,0.0598,0.333,0.0423,'01-JAN-11','01-JAN-11','31-DEC-10'); 
insert into dante2 (subcar, batch_id, silicon, temperature, sulphur, manganese, phosphorus, start_pour, end_pour, sched_cast_date) 
  values( 116,65278 ,0.7116,2470 ,0.0598,0.333,0.0423,'01-JAN-11','01-JAN-11','31-DEC-10'); 

However, I want the dates to look like dd-mon-yy hh24:mi.
Does anyone know how to fix this?

  • 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-23T01:46:33+00:00Added an answer on May 23, 2026 at 1:46 am

    Two options:

    1) If you have alter session privilege, change the NLS_DATE_FORMAT before running the SELECT statement as given below:

    ALTER SESSION SET NLS_DATE_FORMAT = 'DD-MON-RR HH24:MI';
    

    2) If you don’t have ALTER session privilege then apply the transformation for each date field as given below (the stmnt below shows it for START_POUR)

    'TO_DATE(''' || TO_CHAR(START_POUR, 'DD-MON-RR HH24:MI') || ''', ''DD-MON-RR HH24:MI'')'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to INSERT INTO a table using the input from another table.
I am trying to select some fields from one table and insert them into
I'm using an INSERT .. SELECT to 'duplicate' rows from a table (with a
I'm trying to insert multiple rows using SqlCommand from C# to SQL Server. I'm
I am trying to insert 2 rows into the same table. The first will
I was trying to insert some data into a table and I got the
I was trying to insert new data into an existing XML file, but it's
I'm trying to insert a comment character into a string something similar to this:
I'm trying to insert some symbols from LaTeX Math Symbols into my LaTeX document:
I'm trying to make an experimental web application which minimises redundant data. I have

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.