DB2的导出功能

 

CONNECT TO DCDB;

EXPORT TO "/home/db2inst1/db2tobi/portaldb.txt" OF DEL MODIFIED BY NOCHARDEL COLDEL& MESSAGES "/home/db2inst1/db2tobi/OutMsg.txt" SELECT TBLCLICKRECORD.ID AS ID,

       TBLCONTENT.WCMNAME AS WCMID,

       TBLCATEGORY.WCMTITLE AS  CATEGORYTITLE,

       TBLCONTENT.WCMTITLE  AS  CONTENTTITILE,

       TBLCONTENT.WCMHREF   AS  UserDateDept,

       TBLCLICKRECORD.CLICKTIME AS CLICKTIME,

       TBLCLICKRECORD.CLICKUSER AS CLICKUSER,

       TBLCONTENT.CLICKCOUNT  AS  LJCLICKCOUNT

    

      

   FROM DB2INST1.TBLCONTENT AS TBLCONTENT, DB2INST1.TBLCLICKRECORD AS TBLCLICKRECORD, DB2INST1.TBLCATEGORYANDCONTENT AS TBLCATEGORYANDCONTENT, DB2INST1.TBLCATEGORY AS TBLCATEGORY

   WHERE TBLCONTENT.ID = TBLCLICKRECORD.CONTENTID AND TBLCONTENT.ID = TBLCATEGORYANDCONTENT.CONTENTID AND TBLCATEGORY.ID = TBLCATEGORYANDCONTENT.CATEGORYID;

CONNECT RESET;

 

灰色部分只是一条sql语句而已。

你可能感兴趣的:(sql,db2)