- 博客(15)
- 收藏
- 关注
原创 ImproperlyConfigured: ‘sql_server.pyodbc‘ isn‘t an available database backend
pyodbc无法访问mssql
2022-08-12 09:28:56 1417 2
原创 wfastcgi启用失败检查(Ensure your user has sufficient privileges and try again)
仅记录用
2022-08-12 08:57:47 1122
原创 html input标签上传文件限制格式(后缀名)的几种方式
1.accept属性<input type="file" id="f1" name="file" accept=".xls,.xlsx">2.通过js来限制 $("#submit").click(function () { var formData = new FormData(); formData.append("csrfmiddlewaretoken", $("[name='csrfmiddlewaretoken']")
2020-07-09 15:29:51 4259 1
原创 Pandas + Pyodbc 两种方式实现向MSSQL Table 中 Insert 数据
首先是Pandas.to_sql,优势就是简单粗暴。缺点是会重构数据表的结构和内容,默认主键变成index,从0开始.下面是从Excel中读取数据插入table,import sqlalchemyimport pyodbcimport pandas as pdpath = r"C:\Users\shzbabao\Desktop\mrp.xlsx"df = pd.read_excel(path)data = df.iloc[1:, [0,1]]data.columns = ['Column
2020-06-22 20:07:47 1988
原创 Zebra 斑马打印机如何打印中文参数
要实现ZPL打印中文,首先需要zebra打印机加载SIMSUN.TTF(宋体),然后在ZPL中编码使用UTF-8的encoding来打印,类似如下:^XA #标签的开始^CW1,E:SIMSUN.FNT #绑定字体^CI28 #UTF-8编码^FO100,300^A1N,40,,E:SIM000.FNT^FR^FD简体中文abcd1234 ^FS^FO100,380^A1N,40,,E:SIM000.FNT^FR^FD简体中文abcd1234^FS^XZ #结束...
2020-06-22 19:49:45 8161 3
原创 SQL 格式化数字,千分位分隔符并保留2位小数
--sql语句如下:SELECT CONVERT(VARCHAR(15),CAST(CONVERT(DECIMAL(12,2),LTRIM(PREPAY)) AS MONEY),1) PREPAY_V,PREPAY FROM INVOICEHD--格式:CONVERT(VARCHAR(15),CAST(CONVERT(DECIMAL(12,2),LTRIM(数据库字段名)) AS MONEY),1)SELECT CONVERT(VARCHAR(100),CAST(CONVERT(DECIM
2020-06-22 19:44:59 1226
原创 Python Pandas excelWriter 定制格式,定制表头、渲染颜色等
ExcelWriter这个插件有个坑,就是已经设置好的格式是无法更改的,因此,由pandas转成excel的时候,必须将格式清除,尤其是表头的格式,代码如下:import pandas.io.formats.excelpandas.io.formats.excel.header_style = None标准的保存pandas表到excel的形式为:writer = pd.ExcelWriter(output_prefix + cv_excel_file_name)df.to_excel(writ
2020-06-18 15:25:41 9005 3
原创 SQL TOP 10 CPU
USE [master]GO/****** Object: StoredProcedure [dbo].[sp_topCPU10_ben] Script Date: 2020/5/19 15:26:00 ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOALTER procedure [dbo].[sp_topCPU10_ben]as SELECT TOP 10 [session_id], [request_id],
2020-06-01 10:27:57 228
原创 SQL 查询当前DB中哪个进程阻塞
USE [master]GO/****** Object: StoredProcedure [dbo].[sp_who_lock_BEN] Script Date: 2020/5/19 15:25:27 ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOALTER procedure [dbo].[sp_who_lock_BEN] as begin declare @spid int
2020-06-01 10:26:54 236
原创 SQL查询当前DB中哪些表缺失索引
USE [master]GO/****** Object: StoredProcedure [dbo].[usp_Index_MissingIndexCreation_Ben] Script Date: 2020/5/19 15:26:13 ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOALTER PROCEDURE [dbo].[usp_Index_MissingIndexCreation_Ben] AS
2020-06-01 10:25:14 213
原创 SQL 查询当前数据库中已存在的存储过程或视图中含有的内容
select b.name,a.textfrom dbo.syscomments a, dbo.sysobjects b where a.id=b.id and b.xtype='p' and a.text like '% *from %'#p表示存储过程 V表示视图#p表示存储过程 V表示视图
2020-06-01 10:22:51 425
原创 SQL如何实现行转列
select SerialNumber,max (case when df.Description='ActualWeight' then PD.Content else '' end) as ActualWeight,max (case when df.Description='DeliveryID' then PD.Content else '' end) as DeliveryID,max (case when df.Description='Dimension' then PD.Conten
2020-06-01 10:20:10 311
原创 SQL替换其中的某个字符
select stuff(Value,20,1,'4') from dbo.ffSerialNumber where Value like'FF650-01998-02031915%'update dbo.ffSerialNumber set Value=stuff(Value,20,1,'4') where Value like'FF650-01998-02031915%'
2020-06-01 10:19:03 362
原创 SQL 替换回车符
select * from dbo.luDefectupdate luDefectset Description= REPLACE(Description, CHAR(13), '')where REPLACE(Description, CHAR(13), '<br>') like '%<br>%'
2020-06-01 10:17:34 435
原创 ZPL如何实现多字体打印(中文+英文)
ZPL实现多字体打印(中文+英文)^XA^CW1,E:SIMSUN.FNT #绑定宋体^CI28^FO100,300^A1N,40,,E:SIM000.FNT^FR^FD%CustomerShipToAdd1%^FS^FO100,380^A1N,40,,E:SIM000.FNT^FR^FD%CustomerShipToAdd2%^FS^CW0,E:ARI000.FNT #绑定Arial字体^CI28^FO100,500^A0N,60,,E:ARI000.FNT^FR^FDPO:^FS^FO
2020-06-01 10:15:02 5873 1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人