Link to home
Start Free TrialLog in
Avatar of donnatronious
donnatroniousFlag for United States of America

asked on

Using select statement from input file with DB2 EXPORT

I'm successfully doing an export using the following shell script

#!/bin/ksh

db2 Connect to ALIAS user USERNAME using PASSWORD

db2 "EXPORT TO result.dat OF DEL MODIFIED BY NOCHARDEL COLDEl| select memrecno, memidnum from mpi_memhead fetch first 10 rows only"

db2 terminate

Open in new window


Rather than having my select statement where it is, I'd like to specify a file with the select statement.  My googling isn't helping :-/

Thanks in advance.
ASKER CERTIFIED SOLUTION
Avatar of Kent Olsen
Kent Olsen
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial