Board logo

标题: 转换SQL语句格式 [打印本页]

作者: pinghouse     时间: 2009-5-18 12:17    标题: 转换SQL语句格式

哪位大侠帮忙看看,怎么把下面的语句
select a.bsc,
        a.bts,
        b.bts_name,
        a.cell,
        a.EGPRS_AV_PDTCH_MAX,
        a.EGPRS_AV_PDTCH_MN
   from dev.gbp_mot_cell_gsr8 a, wx_net_g b
  Where a.EGPRS_AV_PDTCH_MN <> 0
    And a.record_time =
        to_date('2008-05-26 19:00:00', 'yyyy-mm-dd hh24:mi:ss')
    and a.cell = b.cell
    and b.delflag = '0'
转换为一行的数据。在原行于行之间要加空格
select a.bsc,a.bts,b.bts_name,a.cell,a.EGPRS_AV_PDTCH_MAX,a.EGPRS_AV_PDTCH_MN from dev.gbp_mot_cell_gsr8 a, wx_net_g b Where a.EGPRS_AV_PDTCH_MN <> 0 And a.record_time = to_date('2008-05-26 19:00:00', 'yyyy-mm-dd hh24:mi:ss') and a.cell = b.cell and b.delflag = '0'
作者: tireless     时间: 2009-5-18 12:37

@echo off
(for /f "tokens=*" %%a in (a.txt) do set/p=%%a <nul) > 1line.txt
start 1line.txt