截取的SQl语句如下
insert into [T_Mall_Customer] ([Customer_Id],[Customer_NameAb],
[Customer_Name],[CounterStatus],[CounterOpenDate],[TransType],[SettlementType],[SettlementDate],
[CollectionCycle],[FixDeductPoint],[CityLevel],[MallLevel],[CustomerLevel],[CounterPosition],
[CounterArea],[Brand_Id],[SalesClerk_Id],[ShopAssistantCount],[MinSaleAmount],[CounterDeposit],
[CounterExpense],[IsImageCounter],[IsImportantCounter],[SalesDepContactor],[SalesDepTel],[SalesDepFax],
[SalesDepMobile],[FinanceDepContactor],[FinanceDepTel],[FinanceDepFax],[FinanceDepMobile],[FinanceDepCheckSheet],
[InvoiceType],[UniteNum],[Province_Id],[City_Id],[MallAddress],[MallZipCode],
[CustomerInvoiceAddress],[CustomerInvoiceZipCode],[ContractStatus],[Creator],[CreateDate],[Status],
[description],[programname],[stationid],[RecordCreationDate],[RecordCreator],[RecordVersion],
[SalesDepConTitle],[FinanceDepConTitle],[Customer_Code]) values(N'787f266f-fb1c-4484-8e7a-e1611bbc0cd2',N'jh',
N'nmmn',(select case when N'3' ='NULL' or N'3'='' then null else N'3' end),N'2011-10-12',(select case when N'1' ='NULL' or N'1'='' then null else N'1' end),(select case when N'1' ='NULL' or N'1'='' then null else N'1' end),(select case when N'-0.239' ='-0.239' or N'-0.239'='' then null else -0.239 end),
0,12,(select case when N'' ='NULL' or N''='' then null else N'' end),(select case when N'' ='NULL' or N''='' then null else N'' end),(select case when N'' ='NULL' or N''='' then null else N'' end),(select case when N'' ='NULL' or N''='' then null else N'' end),
(select case when N'-0.239' ='-0.239' or N'-0.239'='' then null else -0.239 end),(select case when N'0d567904-3bdf-476e-b44d-58224755943e' ='NULL' or N'0d567904-3bdf-476e-b44d-58224755943e'='' then null else N'0d567904-3bdf-476e-b44d-58224755943e' end),N'0004',(select case when N'0' ='-0.239' or N'0'='' then null else 0 end),0,0,
(select case when N'0' ='-0.239' or N'0'='' then null else 0 end),N'False',N'False',N'',N'',N'',
N'',N'',N'',N'',N'',N'纸本对账',
(select case when N'' ='NULL' or N''='' then null else N'' end),N'',(select case when N'' ='NULL' or N''='' then null else N'' end),(select case when N'' ='NULL' or N''='' then null else N'' end),N'hgjjh',N'',
N'hgjjh',N'',(select case when N'0' ='NULL' or N'0'='' then null else N'0' end),N'001',N'2011-10-12',(select case when N'0' ='NULL' or N'0'='' then null else N'0' end),
N'',N'CMallCustomer',N'b6ad75f255cb45c',N'2011-10-12 20:11:52',N'001',null,
N'',N'',N'fdfddf')
insert into [T_Mall_Customer] ([Customer_Id],[Customer_NameAb],
[Customer_Name],[CounterStatus],[CounterOpenDate],[TransType],[SettlementType],[SettlementDate],
[CollectionCycle],[FixDeductPoint],[CityLevel],[MallLevel],[CustomerLevel],[CounterPosition],
[CounterArea],[Brand_Id],[SalesClerk_Id],[ShopAssistantCount],[MinSaleAmount],[CounterDeposit],
[CounterExpense],[IsImageCounter],[IsImportantCounter],[SalesDepContactor],[SalesDepTel],[SalesDepFax],
[SalesDepMobile],[FinanceDepContactor],[FinanceDepTel],[FinanceDepFax],[FinanceDepMobile],[FinanceDepCheckSheet],
[InvoiceType],[UniteNum],[Province_Id],[City_Id],[MallAddress],[MallZipCode],
[CustomerInvoiceAddress],[CustomerInvoiceZipCode],[ContractStatus],[Creator],[CreateDate],[Status],
[description],[programname],[stationid],[RecordCreationDate],[RecordCreator],[RecordVersion],
[SalesDepConTitle],[FinanceDepConTitle],[Customer_Code]) values(N'787f266f-fb1c-4484-8e7a-e1611bbc0cd2',N'jh',
N'nmmn',(select case when N'3' ='NULL' or N'3'='' then null else N'3' end),N'2011-10-12',(select case when N'1' ='NULL' or N'1'='' then null else N'1' end),(select case when N'1' ='NULL' or N'1'='' then null else N'1' end),(select case when N'-0.239' ='-0.239' or N'-0.239'='' then null else -0.239 end),
0,12,(select case when N'' ='NULL' or N''='' then null else N'' end),(select case when N'' ='NULL' or N''='' then null else N'' end),(select case when N'' ='NULL' or N''='' then null else N'' end),(select case when N'' ='NULL' or N''='' then null else N'' end),
(select case when N'-0.239' ='-0.239' or N'-0.239'='' then null else -0.239 end),(select case when N'0d567904-3bdf-476e-b44d-58224755943e' ='NULL' or N'0d567904-3bdf-476e-b44d-58224755943e'='' then null else N'0d567904-3bdf-476e-b44d-58224755943e' end),N'0004',(select case when N'0' ='-0.239' or N'0'='' then null else 0 end),0,0,
(select case when N'0' ='-0.239' or N'0'='' then null else 0 end),N'False',N'False',N'',N'',N'',
N'',N'',N'',N'',N'',N'纸本对账',
(select case when N'' ='NULL' or N''='' then null else N'' end),N'',(select case when N'' ='NULL' or N''='' then null else N'' end),(select case when N'' ='NULL' or N''='' then null else N'' end),N'hgjjh',N'',
N'hgjjh',N'',(select case when N'0' ='NULL' or N'0'='' then null else N'0' end),N'001',N'2011-10-12',(select case when N'0' ='NULL' or N'0'='' then null else N'0' end),
N'',N'CMallCustomer',N'b6ad75f255cb45c',N'2011-10-12 20:11:52',N'001',null,
N'',N'',N'fdfddf')
解决方案 »
- 求一个批量添加的insert触发器
- 请问,MS SQL中如何不同表间复制列?
- 跪求sql远程溢出漏洞补丁
- CSDN主页弹出窗口
- 数据库的关系
- 请问如何在sql中计算出间隔天数(每月不管月大月小都按30天算)
- 一次性修改列排序规则
- sql server怎麼確定表裡面某一列全部是null??
- 如何自动删除一个临时表?有没有临时表使用的例子,急!
- 出处茅庐!请过来人给我讲讲,谢谢!!!
- SQL Server 2005 Analysis service 无法开启
- 一个很绕的SQL需求:一个合同可以被多个发货关联,一个合同也可以被多个发票关联;但是发货和发票没关联。要求通过“匀”的机制,让合同、发货、发票都关联起来
[Customer_Name],[CounterStatus],[CounterOpenDate],[TransType],[SettlementType],[SettlementDate],
[CollectionCycle],[FixDeductPoint],[CityLevel],[MallLevel],[CustomerLevel],[CounterPosition],
[CounterArea],[Brand_Id],[SalesClerk_Id],[ShopAssistantCount],[MinSaleAmount],[CounterDeposit],
[CounterExpense],[IsImageCounter],[IsImportantCounter],[SalesDepContactor],[SalesDepTel],[SalesDepFax],
[SalesDepMobile],[FinanceDepContactor],[FinanceDepTel],[FinanceDepFax],[FinanceDepMobile],[FinanceDepCheckSheet],
[InvoiceType],[UniteNum],[Province_Id],[City_Id],[MallAddress],[MallZipCode],
[CustomerInvoiceAddress],[CustomerInvoiceZipCode],[ContractStatus],[Creator],[CreateDate],[Status],
[description],[programname],[stationid],[RecordCreationDate],[RecordCreator],[RecordVersion],
[SalesDepConTitle],[FinanceDepConTitle],[Customer_Code])
values(
N'787f266f-fb1c-4484-8e7a-e1611bbc0cd2',N'jh',
N'nmmn',
(case when N'3' ='NULL' or N'3'='' then null else N'3' end),N'2011-10-12',
(case when N'1' ='NULL' or N'1'='' then null else N'1' end),
(case when N'1' ='NULL' or N'1'='' then null else N'1' end),(case when N'-0.239' ='-0.239' or N'-0.239'='' then null else -0.239 end),0,12,(case when N'' ='NULL' or N''='' then null else N'' end),(case when N'' ='NULL' or N''='' then null else N'' end),(case when N'' ='NULL' or N''='' then null else N'' end),(case when N'' ='NULL' or N''='' then null else N'' end),
(case when N'-0.239' ='-0.239' or N'-0.239'='' then null else -0.239 end),(case when N'0d567904-3bdf-476e-b44d-58224755943e' ='NULL' or N'0d567904-3bdf-476e-b44d-58224755943e'='' then null else N'0d567904-3bdf-476e-b44d-58224755943e' end),N'0004',(case when N'0' ='-0.239' or N'0'='' then null else 0 end),0,0,
(case when N'0' ='-0.239' or N'0'='' then null else 0 end),N'False',N'False',N'',N'',N'',
N'',N'',N'',N'',N'',N'纸本对账',
(case when N'' ='NULL' or N''='' then null else N'' end),N'',(case when N'' ='NULL' or N''='' then null else N'' end),(case when N'' ='NULL' or N''='' then null else N'' end),N'hgjjh',N'',
N'hgjjh',N'',(case when N'0' ='NULL' or N'0'='' then null else N'0' end),N'001',N'2011-10-12',(case when N'0' ='NULL' or N'0'='' then null else N'0' end),
N'',N'CMallCustomer',N'b6ad75f255cb45c',N'2011-10-12 20:11:52',N'001',null,
N'',N'',N'fdfddf')select case when
改為
case when
to“roy_88(中國風)”太感谢你了,你太强了,太牛逼了,我问了公司所有人,还在网上查了,都没有结果,谢谢了,鲜花送给你,哈哈哈哈,高兴啊...