如何在oracle中實(shí)現(xiàn)報(bào)表的定長(zhǎng)輸出呢?
select rpad(substr(zcswz_zcbh,0,20),20,' ') as pi from zcswz 用rapd函數(shù),后邊的20是長(zhǎng)度,引號(hào)里是個(gè)空格,也就是不足20位的補(bǔ)齊20位長(zhǎng)度,長(zhǎng)度不夠的用空格填充
如何在oracle中實(shí)現(xiàn)報(bào)表的定長(zhǎng)輸出呢?
select rpad(substr(zcswz_zcbh,0,20),20,' ') as pi from zcswz 用rapd函數(shù),后邊的20是長(zhǎng)度,引號(hào)里是個(gè)空格,也就是不足20位的補(bǔ)齊20位長(zhǎng)度,長(zhǎng)度不夠的用空格填充