US and Worldwide: +1 (866) 660-7555
Results 1 to 3 of 3

Thread: "split fields" for numbers and group using SPACE " "

  1. #1
    Join Date
    May 2012
    Posts
    14

    Default "split fields" for numbers and group using SPACE " "

    Hi

    I have a flat file that i parse. it contains columns separated by "|" and for 3 columns I have such format for numbers:
    | 1 062,000-| 2 289,67-| 1 274,400-|

    --> 1000th separatod : SPACE
    --> negative : at the end
    --> decimal separator: ,

    In order to code that I used:

    • FORMAT: ### ###.###;### ###.###-
    • GROUPEMENT : <SPACE>
    • DECIMAL: ,


    The previsualisation looks fine (all numbers are OK) 1 062- 2 289,67- 1 274,4- but inserting those values with "TABLE OUTPUT" (into MS SQL) I get following error:
    Error inserting/updating row - Data truncation

    I guess the issue is that MS SQL does not like the "space" as group delimiters.

    Could youi please so kind and explain me how to resolve such issue?

    Thanks

  2. #2
    Join Date
    Jun 2012
    Posts
    1,609

    Default

    You had to specify the number format, because you wanted the number parser to convert correctly the external format to an numeric value.
    Your Table output step complains about a column not being wide enough, most likely a character column.
    The daabase never sees the display format of the numbers.
    Try to switch to debugging level to get some hints.
    pdi-ce-4.4.0-stable
    OpenJDK IcedTea 2.3.9 (7u21)
    ubuntu 12.04 LTS (x86_64)

  3. #3
    Join Date
    May 2012
    Posts
    14

    Default

    you are right, the DB number format was too small.

    What a lost of time looking for this issue.....

    Thanks

Posting Permissions

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