求教各位前辈,navicat中使用mysql数据库插入数据不能成功

zhangyu_torres 2015-07-17 04:28:41
create table `fact_refund`(
`id` int(10) NOT NULL AUTO_INCREMENT
,`RefundDate` varchar(30) NOT NULL DEFAULT ''
,`RefundCreateDate` varchar(30) NOT NULL DEFAULT ''
,`OrderInfoID` int(10) NOT NULL DEFAULT '0'
,`ProductCode` varchar(100) NOT NULL DEFAULT ''
,`ProductName` varchar(1000) NOT NULL DEFAULT ''
,`SiteName` varchar(100) NOT NULL DEFAULT ''
,`Currency` varchar(100) NOT NULL DEFAULT ''
,`ListingID` varchar(100) NOT NULL DEFAULT ''
,`SellerAccountID` int(10) NOT NULL DEFAULT '0'
,`BuyerAccount` varchar(600) NOT NULL DEFAULT ''
,`BuyerName` varchar(600) NOT NULL DEFAULT ''
,`SalesPlatformID` int(10) NOT NULL DEFAULT '0'
,`ProductQuantity` int(10) NOT NULL DEFAULT '0'
,`ProductPrice` decimal(10,2) NOT NULL DEFAULT '0.00'
,`Status` int(5) NOT NULL DEFAULT '0'
,`RefundType` varchar(100) NOT NULL DEFAULT ''
,`RefundQty` int(10) NOT NULL DEFAULT '0'
,`RefundTotalQty` int(10) NOT NULL DEFAULT '0'
,`RefundPrice` decimal(20,2) NOT NULL DEFAULT '0.00'
,`RefundTotalPrice` decimal(20,2) NOT NULL DEFAULT '0.00'
,`PaymentTypeID` int(5) NOT NULL DEFAULT '0'
,`GUID` varchar(50) NOT NULL DEFAULT ''
,`CurrencytoUSDRate` decimal(10,4) NOT NULL DEFAULT '0.0000'
,`PaymentDate` varchar(30) NOT NULL DEFAULT ''
,`OrderDate` varchar(30) NOT NULL
,PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

insert into fact_refund
select
null as id
,t1.last_upd_date as RefundDate
,t1.create_date as RefundCreateDate
,COALESCE(t3.OrderInfoID,t2.OrderInfoID,0) as OrderInfoID
,COALESCE(t3.ProductCode,'') as ProductCode
,COALESCE(t3.ProductName,'') as ProductName
,COALESCE(t3.SiteName,'') as SiteName
,COALESCE(t3.Currency,'') as Currency
,COALESCE(t3.ListingID,'') as ListingID
,COALESCE(t3.SellerAccountID,0) as SellerAccountID
,COALESCE(t3.BuyerAccount,'') as BuyerAccount
,COALESCE(t3.BuyerName,'') as BuyerName
,COALESCE(t3.SalesPlatformID,0) as SalesPlatformID
,COALESCE(t3.ProductQuantity,0) as ProductQuantity
,COALESCE(t3.ProductPrice,0.00) asProductPrice
,COALESCE(t1.status,'') as Status
,COALESCE(t1.RefundType,'') as RefundType
,COALESCE(t2.RefundQty,'') as RefundQty
,COALESCE(t1.Quantity,'') as RefundTotalQty
,COALESCE(t2.RefundPrice,0.00) as RefundPrice
,COALESCE(t1.RefundPrice,0.00) as RefundTotalPrice
,COALESCE(t1.PaymentTypeID,0) as PaymentTypeID
,COALESCE(t3.GUID,'') as GUID
,COALESCE(t3.CurrencyToUSDRate,0.0000) as CurrencytoUSDRate
,COALESCE(t3.PaymentDate,'') as PaymentDate
,COALESCE(t3.OrderDate,'') as OrderDate
from data_warehouse_origin.refundmentinfo_refund_info t1
left join data_warehouse_origin.refundmentinfo_orderpaypalrefund t2
on t1.id = t2.PayPalRefundID
left join data_warehouse.fact_order t3
on t2.OrderInfoID = t3.OrderInfoID
...全文
726 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
ACMAIN_CHM 2015-07-17
  • 打赏
  • 举报
回复
换在命令行下尝试一下。
zhu19774279 2015-07-17
  • 打赏
  • 举报
回复
有可能是数据量太大。 在命令行界面用source导入呢?
zhangyu_torres 2015-07-17
  • 打赏
  • 举报
回复
插入一个多小时了,没有响应,数据量大概是百万左右,是哪出问题了?

56,679

社区成员

发帖
与我相关
我的任务
社区描述
MySQL相关内容讨论专区
社区管理员
  • MySQL
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧