将sql server insert脚本转换为oracle insert脚本? [英] Convert sql server insert script into oracle insert script?
问题描述
将sql server insert脚本转换为oracle insert脚本?
下面这个sql server脚本..
INSERT [dbo]。[tblPayMaster]([NoteNumber],[NoteDate],[CentreCode],[ParamCode],[Fromdate],[ToDate],[PayedServiceType],[PayedEmployeeType] ,[PayedServiceStatus],[LocationType],[LocatonCode],[StateCode])VALUES(N'',CAST(N'2011-10-12 00:00:00.000'AS DateTime),8,N'',CAST( N'2011-09-01 00:00:00.000'AS DateTime),CAST(N'2011-09-30 00:00:00.000'AS DateTime),4,14,62,2,8,1)
转换为oracle 10 g脚本。
这应该有效:
INSERT INTO tblPayMaster(NoteNumber,NoteDate,CentreCode,ParamCode,Fromdate,ToDate,PayedServiceType,PayedEmployeeType,PayedServiceStatus,LocationType,LocatonCode,StateCode)
VALUES(TO_DATE('2010/10/12','yyyy / mm / dd')),8,'',TO_DATE('2011/09/0 1','yyyy / mm / dd')),TO_DATE('2011/09/30','yyyy / mm / dd')),4,14,62,2,8,1);
commit;
*注意,你不好的做法是后缀表tbl我也假设最后6个属性是整数。
Convert sql server insert script into oracle insert script?
this sql server script below..
INSERT [dbo].[tblPayMaster] ([NoteNumber], [NoteDate], [CentreCode], [ParamCode], [Fromdate], [ToDate], [PayedServiceType], [PayedEmployeeType], [PayedServiceStatus], [LocationType], [LocatonCode], [StateCode]) VALUES (N'', CAST(N'2011-10-12 00:00:00.000' AS DateTime), 8, N'', CAST(N'2011-09-01 00:00:00.000' AS DateTime), CAST(N'2011-09-30 00:00:00.000' AS DateTime), 4, 14, 62, 2, 8, 1)
convert into oracle 10 g script.
This should work:
INSERT INTO tblPayMaster(NoteNumber, NoteDate, CentreCode, ParamCode, Fromdate, ToDate, PayedServiceType, PayedEmployeeType, PayedServiceStatus, LocationType, LocatonCode, StateCode)
VALUES(TO_DATE('2010/10/12', 'yyyy/mm/dd')), 8, '', TO_DATE('2011/09/01', 'yyyy/mm/dd')), TO_DATE('2011/09/30', 'yyyy/mm/dd')), 4, 14, 62, 2, 8, 1);
commit;
* Note, you it is not good practice to suffix tables "tbl" also I am assuming the last 6 attributes are integers.
这篇关于将sql server insert脚本转换为oracle insert脚本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!