摘要:
将逗号分隔的列转行 第一种方法: 需求:按ID,把PARTICIPATORS字段里的内容按‘,’ 分开,转成行 select id,PARTICIPATORS from (with test as (select id ,PARTICIPATORS from NSC_OA_RW where PART 阅读全文
摘要:
SELECT * FROM v$sql where last_active_time>TO_DATE('2019-7-18 13:17:00','yyyy-mm-dd hh24:mi:ss') ORDER BY LAST_ACTIVE_TIME DESC; select s.sql_text, b. 阅读全文
摘要:
/****** SQLserver 写法 ******/ SELECT * FROM [lx].[dbo].[全国销售额] where province='北京' --group by [province],[name] --按销售额排序 取每个省的前4名,剩下的为其他 select * from 阅读全文
摘要:
set @sql='insert into '+@ltable+'(ywyID,ywymc,bmmc,deptpath,sjbmmc,iysSum) select ywyID,ywymc,bmmc,deptpath,sjbmmc,sum(iSum) iSum from (select ywyID,y 阅读全文