Hi, Shaunn

1- you can output the delimiters explicitly as literals, for example:

    SELECT a, ',', B, ',', C FROM ME.THETABLE;

which is OK in some simple cases. Be aware thet if columns may contain 
commas then you must do a translation.

2- if the target database is a DB2 database then you can copy a table 
from one DB th the other using the control center ==> table ==> copy ==> 
...

3- you can do the control center suggestion and, instead of running the 
connamd, click "see SQL" and take a look at the generated script, whico 
is supposes to be correct

4- I'm not sure, but I have a fuzzy idea about not running export in the 
workstation but in the server. There is a great probability that I'm 
wrong in this one, but I always run exports (thru dbmove) in the server.  

5- Good luck!

Juan Lanus
TECNOSOL




Johnson, Shaunn wrote:

> Howdy:
>
> This may seem a little silly:
>
> I'm running an SQL script and redirecting the output into a
> file.  I'd like to import that data into another database,
> but when I view the file, there doesn't seem to be a delimiter
> (or rather, there are spaces between all of the fields).
>
> The number of columns never appear correct and I can't import
> the information because of that fact.
>
> Background:
>
> I'm running the NT DB2 client through a gateway to connect to
> OS/390 v6.1 DB2 database.  The NT client application is version 5.
> The SQL script is very straight forward; this is the method I'm
> using:
>
> db2 -tf script.sql -z f:\backup\output_file.txt
>
>
> I have tried the EXPORT option inside my script:
>
> [snip]
>
> connect to DB2DATA user joeuser using password;
> export to f:\backup\output_file.txt
> select * from DB2DATA.DB2TABLE_Table
>
> [/snip]
>
> And the message I got from THAT was:
>
>
> [snip error]
>
> C:\SQLLIB\bin\scripts>db2 -tf script.sql
>
>    Database Connection Information
>
>  Database server        = DB2 OS/390 6.1.1
>  SQL authorization ID   = JOEUSER
>  Local database alias   = DB2DATA
>
>
> SQL1325N  The remote database environment does not support the command 
> or one
> of the command options.
>
> DB21018E  A system error occurred. Command Line Processor could not 
> continue
> processing.
>
> [/snip error]
>
> So ... my questions are:
>
> 1) Is there an option to input, say, a tab delimiter between
> the column when I create the file from this script?  That is to
> say, if I use the db2 CLP options, is there a particular option
> I can use to separate the fields in a way I can use to IMPORT the
> data into another database.
>
> 2) My method of using export my be incorrect ... does anyone have
> an example of how I should be using this?  I imagined that I did use
> the command properly, but, as stated with the error above, the
> environment doesn't support it.
>
>
> Note: We're trying to get away from tools, such as MS Access; so I'm
> sticking with the command line option.
>
> Thanks!
>
> -shaunn
>



=====
To unsubscribe, send 'unsubscribe' to [EMAIL PROTECTED]
For other info (and scripts), see http://people.mn.mediaone.net/scottrmcleod

Reply via email to