Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2013
    Posts
    4

    Unanswered: Help with IMPORT / timestampformat inside SYSPROC.ADMIN_CMD

    Hi! I'm running

    DB2 v10.1.0.872, s120403. NT32101 fixpack 0
    32 bit, code level SQL10010

    on Windows Server 2008R2.


    I try to run this statement

    Code:
    CALL SYSPROC.ADMIN_CMD('
    	IMPORT FROM c:/SRS2013IMPORT/DataValueTest.csv OF DEL 
    	modified by timestampformat="YYYY-MM-DD HH:MM"
    		decpt,
    	METHOD P (1, 2, 3, 5) 
    	SKIPCOUNT 1 
    	INSERT INTO SRS_IMPORT.DATAVALUE_IMPORT(DataFeedNK, DataValue, DatetimeFrom, DataValueBatchName)'
    );
    But I have trouble with the timestampformat modifier. If I run the code like above, I get a message that says (translated from swedish):

    An unexcepted keyword "
    " was found in the parameter filetmod for the file type.. SQLCODE=-3016, SQLSTATE= , DRIVER=3.64.106

    if I remove the double quotes around the timestampformat, I get the message

    The format "TIMESTAMPFORMAT" that starts with the string "YYYY-MM-DD" is illegal.. SQLCODE=-3192, SQLSTATE= , DRIVER=3.64.106

    What syntax should I use?

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Firstly, I would not put new line/carriage return characters in the command string.
    ---
    "It does not work" is not a valid problem statement.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •