donnatronious
asked on
Using select statement from input file with DB2 EXPORT
I'm successfully doing an export using the following shell script
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.
#!/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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.