Skip to Content
author's profile photo Former Member
Former Member

test data generation doesn'T surround date string with to_date()

Hi,

I generate test data for a fact table with several date/time columns.

For example:

insert into DWH_AL.FACT_QMS_VERWEILDAUER (AFTFZGVWLDA_ID, ABFAHRT_PERIODE_ID, PZ_ID, BST_ID, KGW_ID, LADEZUSTAND_ID, BBFA_ID, AUFTRAG_ID, AUFTRAG_ERFASS_DATUM, FZG_ID, EINGANGS_ZUG_ID, ANKUNFTSZEITPUNKT, AUSGANGS_ZUG_ID, ABFAHRTSZEITPUNKT, VERSAND_KUNDE_ID, EMPFANG_KUNDE_ID, VERSAND_LAND_ID, VERSAND_BST_ID, EMPFANG_LAND_ID, EMPFANG_BST_ID, PRODUKT_ID, GEFAHRGUT_ID, DFB_ID, GEFAHRGUT_FLG, VERWEILDAUER, LDTS, UPTS, LOAD_ID, UPDLOAD_ID) values (9, 20150821, 30, 80664565, 1, 2, 5, 130, '2013-12-2 19:54:46', 315139076543, 201310180744129, '2013-8-12 13:36:5', 201310190240007, '2013-3-7 3:48:53', 609894522, 604413203, 49, 80661124, 59, 80660647, 12, 77, 18, 'N', 84, '2014-7-14 0:0:0', '2014-2-11 0:0:0', -1, -1);

As you can see the date/time string isn't encapsulated with a valid to_date().

Are the any settings to change to get a valid insert statement?

kind regards

Christian

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Feb 19, 2014 at 02:46 PM

    Hi Christian,

    i had a look at the definition of a profile for date&time, but did not find a way to define a function.

    where did you get the idea that pd could do this?
    kr

    klaus

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      I'm not very familiar with oracle so I didn't know the alter session set nls_date_format='YYYY-MM-DD HH24:MI:SS'; setting.

      This setting allows to insert my dates with out problems.

      thanks

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.