+ Reply to Thread
Results 1 to 7 of 7

How to automate selecting the column format to text so that we dont lose leading zeroes

  1. #1
    Registered User
    Join Date
    10-08-2014
    Location
    birmingham,US
    MS-Off Ver
    2010
    Posts
    3

    How to automate selecting the column format to text so that we dont lose leading zeroes

    I have a problem with a csv file generated on unix by ETL application (informatica) as its dropping leading zeroes.the only problem here is client does not want manual intervention to format the column as text.

    I dont know if we can do this through a script .It would be great if we can call this on UNIX side as source is unix and recipeient (client) is on windows.

    Any basic script to achieve the same is greatly appreciated..I am also attacing a sample of the csv file.


    thanks
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor bulina2k's Avatar
    Join Date
    11-20-2012
    Location
    Urziceni, Ialomita, Romania
    MS-Off Ver
    2019 and 365
    Posts
    867

    Re: How to automate selecting the column format to text so that we dont lose leading zeroe

    Hello

    In what field does the missing zeros should be?

    TESTING AUTOMATED SWAT DESCRIPTION ,7/25/2014,2061069,1069,19,77,19544,SEEMA JONES,RENAY STRONGE,,2055 HAMILTON DRIVE , ,PLYMOUTH MEETING , PA,19462-0000,US,6493385068,3,19128, ,0,41,21,P2,39.16,425.75,0,B64C8100 ,8/10/2012,2014-07-01-01.03.48.649863

    should be what?
    .. and don't forget to have fun!
    Bogdan.

    mark SOLVED and Add Reputation if my answer pleases you

  3. #3
    Registered User
    Join Date
    10-08-2014
    Location
    birmingham,US
    MS-Off Ver
    2010
    Posts
    3

    Re: How to automate selecting the column format to text so that we dont lose leading zeroe

    fourth field in the file.

  4. #4
    Valued Forum Contributor bulina2k's Avatar
    Join Date
    11-20-2012
    Location
    Urziceni, Ialomita, Romania
    MS-Off Ver
    2019 and 365
    Posts
    867

    Re: How to automate selecting the column format to text so that we dont lose leading zeroe

    Come on etldev! help me out a little! how many zeros should there be?
    1069 goes to what ?

  5. #5
    Registered User
    Join Date
    10-08-2014
    Location
    birmingham,US
    MS-Off Ver
    2010
    Posts
    3

    Re: How to automate selecting the column format to text so that we dont lose leading zeroe

    that was just an example.supposing 1069 had a leading zero we would want to preserve it from dropping.there are some other examples not 1069 in sprsheet

  6. #6
    Valued Forum Contributor bulina2k's Avatar
    Join Date
    11-20-2012
    Location
    Urziceni, Ialomita, Romania
    MS-Off Ver
    2019 and 365
    Posts
    867

    Re: How to automate selecting the column format to text so that we dont lose leading zeroe

    Ok, please give me an example of a record as it is in csv and the same row as should be (including the leading zeros). I intend to automate a process to put back the zeros in the fields that they're missing but i don't know how many and in which fields...

  7. #7
    Valued Forum Contributor bulina2k's Avatar
    Join Date
    11-20-2012
    Location
    Urziceni, Ialomita, Romania
    MS-Off Ver
    2019 and 365
    Posts
    867

    Re: How to automate selecting the column format to text so that we dont lose leading zeroe

    Quote Originally Posted by etldev View Post
    that was just an example.supposing 1069 had a leading zero we would want to preserve it from dropping.there are some other examples not 1069 in sprsheet

    ok, lets say we can't preserve it from dropping but we can put them back.. if we know in which field/column and how many zeros (how many characters the number should have including the zeros)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: 02-21-2014, 12:11 PM
  2. Format-leading zeroes and formula
    By prasjohn in forum Excel General
    Replies: 1
    Last Post: 02-13-2010, 10:43 AM
  3. Leading zeroes in a text field
    By MarlaJ in forum Excel General
    Replies: 8
    Last Post: 02-12-2007, 06:33 PM
  4. Replies: 2
    Last Post: 10-05-2005, 02:05 PM
  5. Replies: 1
    Last Post: 05-04-2005, 02:06 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1