上週做系統演示時需要手工製造一些文字資料充當資料來源,想偷偷懶就用了Toad工具直接查詢後匯出成csv格式。今天正好有點時間,整理了一下思路,用sql去實現文字資料的生成。寫了大致框架,有空時再來完善吧。 步驟如下: 新建一個sql指令碼 d:\czrk.sql,程式碼如下: SET echo off SET feedback off SET newpage none SET pagesize 50000 SET linesize 20000 SET verify off SET pagesize 0 SET term off SET trims ON SET heading off SET trimspool ON SET trimout ON SET timing off SET verify off SET colsep | spool d:\czrk.txt SELECT sfzh || "," || xm || "," || xb || "," || csrq || "," || mz|| "," || xzqh|| "," || jzdz FROM m_czrk WHERE rownum
上週做系統演示時需要手工製造一些文字資料充當資料來源,想偷偷懶就用了Toad工具直接查詢後匯出成csv格式。今天正好有點時間,整理了一下思路,用sql去實現文字資料的生成。寫了大致框架,有空時再來完善吧。 步驟如下: 新建一個sql指令碼 d:\czrk.sql,程式碼如下: SET echo off SET feedback off SET newpage none SET pagesize 50000 SET linesize 20000 SET verify off SET pagesize 0 SET term off SET trims ON SET heading off SET trimspool ON SET trimout ON SET timing off SET verify off SET colsep | spool d:\czrk.txt SELECT sfzh || "," || xm || "," || xb || "," || csrq || "," || mz|| "," || xzqh|| "," || jzdz FROM m_czrk WHERE rownum