Created
          October 24, 2013 05:38 
        
      - 
      
 - 
        
Save ericluo/7131914 to your computer and use it in GitHub Desktop.  
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | ;; This buffer is for notes you don't want to save, and for Lisp evaluation. | |
| ;; If you want to create a file, visit that file with C-x C-f, | |
| ;; then enter the text in that file's own buffer. | |
| You can run this command from the DB2 command line processor (CLP) or from inside a SQL application by calling the ADMIN_CMD stored procedure | |
| EXPORT TO result.csv OF DEL MODIFIED BY NOCHARDEL SELECT col1, col2, coln FROM testtable; | |
| There are lots of options for IMPORT and EXPORT that you can use to create a data file that meets your needs. The NOCHARDEL qualifier will suppress double quote characters that would otherwise appear around each character column. | |
| Keep in mind that any SELECT statement can be used as the source for your export, including joins or even recursive SQL. The export utility will also honor the sort order if you specify an ORDER BY in your SELECT statement. | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment