![]() |
|
Archives of the TeradataForumMessage Posted: Mon, 26 Sep 2005 @ 17:29:23 GMT
<-- Anonymously Posted: Monday, September 26, 2005 12:39 --> Hello group.. Here is my frustration of the day from MLOAD .. Please some one help me understand what is happening before I get all insane. (a) I have input fields all defined as VARCHAR(x) (b) My input file is pipe delimited text file (c) 2 of the fields are date fields. Question : In CASE1 what worked fine for with the date columns why when some other fields qualified with some functions, CASE 2, gives me an insane message? Thanks for keeping my sanity --
My INSERT - SELECT statement (Case 1) looks like this
--------------------------------------------
INSERT INTO table_a (
datefield1
, otherfiled1
, otherfield2
, datefiled2
, otherfield3
, otherfield4
, otherfield5
)
VALUES
(
:input_field1 (format 'YYYYMMDD')
,:input_field2
,:input_field3
,:input_field4 (format 'YYYYMMDD')
,:input_field5
,:input_field6
,:input_field7
) ;
-- This statement worked fine inserted the row correctly from the input
file.
CASE 2
--------------------------------------------
INSERT INTO table_a (
datefield1
, otherfiled1
, otherfield2
, datefiled2
, otherfield3
, otherfield4
, otherfield5
)
VALUES
(
:input_field1 (format 'YYYYMMDD') /*** on
changing to (DATE, FORMAT 'YYYYMMDD') works fine ***/
,:input_field2
,COALESCE(:input_field3,'')
,:input_field4 (format 'YYYYMMDD') /*** on
changing to (DATE, FORMAT 'YYYYMMDD') works fine ***/
,ZEROIFNULL(:input_field5)
,ZEROIFNULL(:input_field6)
,:input_field7
) ;
**** 12:20:40 UTY0805 RDBMS failure, 3527: Format string 'YYYYMMDD' has
combination of
numeric, character and GRAPHIC values.
| ||||||||||||||||||||||||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||
| Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
| Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||