Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2004
    Posts
    5

    Unanswered: DB2 and Information Integrator

    Hello

    I am a relative DB2 novice and I am experiencing some problems outputting query results to a delimited file. The query set I am returning includes 15+ attributes and approximately 20,000 records. After reading up on the DB2 documentation I tried to use the EXPORT session functionality from a command prompt via:
    db2 export to filename.del of del .... select ...
    however my select statement is far to long.

    The second method would be to follow a successful method I've been using for smaller queries. An example would be:
    db2 +o -tvf filename.sql -r filenameoutput
    Unfortunately this format doesn't easily display output files with many attributes:

    I would greatly appreciate if someone knows a way via a command prompt to:
    1.Read in an .sql file
    2.Output the query result set to a delimited file


    Thanks

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1

    Re: DB2 and Information Integrator

    Originally posted by canada1

    however my select statement is far to long.

    How long is too long? Obviously, it does not exceed the DB2 sql statement size limit since you are able to execute it from a file...

    Therefore, I assume you're hitting the OS command line length limit. There's nothing that prevents you from putting the entire EXPORT command into a script file and executing it the same way you do it with your SELECT 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
  •