use master go ) drop procedure [dbo].[p_killspid] GO create proc p_killspid ) --要关闭进程的数据库名 as ) ) declare #tb cursor for )) from master..sysprocesses where dbid=db_id(@dbname) open #tb fetch next from #tb into @spid begin exec('kill '+@spid) fetch ne…
直奔主题:把包含中文的csv文件的编码改成utf-8的方法: https://stackoverflow.com/questions/191359/how-to-convert-a-file-to-utf-8-in-python 啰嗦几句: 在用pandas读取hive导出的csv文件时,经常会遇到类似UnicodeDecodeError: 'gbk' codec can't decode byte 0xa3 in position 12这样的问题,这种问题是因为导出的csv文件包含中文,且这些…
INSERT INTO TTT (NSAME, ID, AGE) VALUES ('AAA', '201023210816', '22'); 将上面的SQL格式改成以下的格式 AAA|201023210816|22 import os lists=[] paths = os.getcwd() for root,dirs,files in os.walk('wfyh'): for fn in files: lists.append(fn) for nmb in lists: dfile=open(…
select count(*) from (SELECT A.* FROM (SELECT CD.*, nvl(CV.SUM_CI_BALANCE, 0) as SUM_CI_BALANCE, nvl(CV.SUM_LN_BALANCE, 0) as SUM_LN_BALANCE FROM OCRM_F_CI_CUST_DESC CD left join ( select cust_id, FR_ID, sum(CI_BALANCE) as sum_CI_BALANCE, sum(LN_BALA…
Eclipse的编码格式是系统默认 修改为utf-8,点击Apply and Close 然后项目的编码格式会统一默认utf-8 当然也可以选择other,改成GBK.…
当向 MySQL 数据库插入一条带有中文的数据形如 insert into employee values(null,'张三','female','1995-10-08','2015-11-12','Sales',2000,'是个好员工!'); 出现乱码时,可以使用语句 show variables like 'character%'; 来查看当前数据库的相关编码集. 从上图中可以看到 MySQL 有六处使用了字符集,分别为:client .connection.database.results…
设置默认编码为utf8:set names utf8;设置数据库db_name默认为utf8:ALTER DATABASE `db_name` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;设置表tb_name默认编码为utf8:ALTER TABLE `tb_name`        DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;…
第一步.在菜单栏选择“window“----preference----General-----Workspace   选中Workspace   在右边窗口中找到Text file encoding:   选择other,然后选择utf-8 第二步.在菜单栏选择“window“----preference----General-----Editors----Text Editors-----Spelling: 在右边的窗口中找到Encoding:选择other ,然后选择utf-8 完成!…
怎么样把sql server 2000的用户表的所有者,改成dbo,而不是用户名. 推荐使用下面介绍的第二种方法,执行以下查询便可以了.sp_configure 'allow updates','1' go reconfigure with override go update sysobjects set uid=1 where uid<>1 go sp_configure 'allow updates','0' go reconfigure with override 注意:上面的查询语句…
java.sql.SQLException: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '=',意思是说字符编码不一样,不能进行比较,也就是说数据库内部的编码都不一样,有的数据是latin1_swedish_ci,有的数据是utf8_general_ci,,因此解决此问题的核心就是将数据库所有的编码进行统一. 1.查看数据库编码,使用sq…