摘要:
import cx_Oraclemap1={}map2={}con= cx_Oracle.connect("admin/admin@ssx")cursor=con.cursor()cursor.execute('select * from test1')rows = cursor.fetchall()print rowsfor x,y,z,m in rows : print x print y print z print m map1[x]=y key=','.join([str(x),str(y),str(z),str(m)]) map2[ 阅读全文
摘要:
一:代码如下:建表:create table test(id number,mc number,sl number)插数:insert into test values(2,110,1);insert into test values(1,111,1);insert into test values(2,555,2);insert into test values(1,222,1);insert into test values(2,333,2);insert into test values(1,666,3);insert into test values(1,333,2);insert i 阅读全文
摘要:
select deptno,empno,ename,sal,last_value(sal) over(partition by deptno order by sal ROWS BETWEEN unbounded preceding AND current row ) max_sal,last_value(sal) over(partition by deptno order by sal ) max_sal2,FIRST_VALUE(sal) over(partition by deptno order by sal ROWS BETWEEN unbounded preceding AND 阅读全文
摘要:
#coding:utf-8#!/usr/bin/pythonimport reinput=open('renow_dwload_20130804.txt','r')output1=open('renow_dwload_20130804-01.txt','w+')output2=open('renow_dwload_20130804-02.txt','w+')while True: line=input.readline() if line : if 'np' in line and 阅读全文