Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2012
    Posts
    8

    Unanswered: How to append decimal point . in the exported file

    Hi,
    I am exporting a file of file.txt which has schemaname and tablename in it.

    I want to append a decimal point after schemaname like schemaname.tablename in the file..

    I am using the below statement but its appending , not the decimal point

    export to file.txt of del modified by nochardel decpt. select SCHEMAname , TABlename NAME from syscat.tables

    Please help

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    export to file.txt of del select rtrim(SCHEMAname)||'.'||TABlename NAME from syscat.tables
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  3. #3
    Join Date
    Apr 2012
    Posts
    8
    Hi Marcus,
    Thanks for the reply.
    I am able to export the file as desired.
    But am also getting below error

    SQL3100W Column number "1" (identified as "1") in the output DEL format file
    is longer than 254 bytes.


    What should i do here

  4. #4
    Join Date
    Feb 2008
    Location
    Japan
    Posts
    3,483
    CAST to shorter string, like
    CAST( rtrim(SCHEMAname) || '.' || TABlename AS VARCHAR(50) )

  5. #5
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    export to file.txt of del select rtrim(rtrim(SCHEMAname)||'.'||TABlename) from syscat.tables

    I removed the TABLE tag since it has no meaning in an export command. If you want headers, you will will have to make them yourslef and concat two files together.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

Posting Permissions

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