Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
calvinkwoo3000
Yak Posting Veteran
98 Posts |
Posted - 2013-08-02 : 03:03:50
|
Dear Support Team,I received a sql query from vendor.They are using Oracle server.I run the query file in my MSSQL 2012 and error message shown as below:[red][Error Message: Msg 1018, Level 15, State 1, Line 94Incorrect syntax near 'INDEX'. If this is intended as a part of a table hint, A WITH keyword and parenthesis are now required. See SQL Server Books Online for proper syntax./red]Query Syntaxt: quote: CREATE TABLE AMATS( ARTICD VARCHAR2(8) DEFAULT ' ' NOT NULL, ARTINM VARCHAR2(40) DEFAULT ' ', ARTISN VARCHAR2(30) DEFAULT ' ', DESCNM VARCHAR2(40) DEFAULT ' ', IVSFCD VARCHAR2(6) DEFAULT ' ', SUPPCD VARCHAR2(6) DEFAULT ' ', FACTCD VARCHAR2(2) DEFAULT ' ', MFG_UP NUMBER(15,5) DEFAULT 0, MCUNIT NUMBER(4,0) DEFAULT 1, MFG_UP2 NUMBER(15,5) DEFAULT 0, MCUNIT2 NUMBER(4,0) DEFAULT 1, LSPRUP NUMBER(15,5) DEFAULT 0, LPUNIT NUMBER(4,0) DEFAULT 1, APSLUP NUMBER(15,5) DEFAULT 0, APUNIT NUMBER(4,0) DEFAULT 1, SLPRUT NUMBER(4,0) DEFAULT 1, CASEQT NUMBER(7,0) DEFAULT 0, BOX_QT NUMBER(7,0) DEFAULT 0, TRAYQT NUMBER(7,0) DEFAULT 0, CSSTCD VARCHAR2(2) DEFAULT ' ', LEADTM NUMBER(3,0) DEFAULT 0, DIV_TP VARCHAR2(1) DEFAULT ' ', POCRKB VARCHAR2(1) DEFAULT ' ', PLANTP VARCHAR2(1) DEFAULT ' ', STOCTP VARCHAR2(1) DEFAULT ' ', OTHRTP VARCHAR2(1) DEFAULT ' ', LTKPTP VARCHAR2(1) DEFAULT ' ', POSTTP VARCHAR2(1) DEFAULT ' ', SOSPTP VARCHAR2(1) DEFAULT ' ', SLSPTP VARCHAR2(1) DEFAULT ' ', FOSPTP VARCHAR2(1) DEFAULT ' ', MFSPTP VARCHAR2(1) DEFAULT ' ', ASGNTP VARCHAR2(1) DEFAULT ' ', ATASTP VARCHAR2(1) DEFAULT ' ', ASGNDY NUMBER(3,0) DEFAULT 0, ROHSTP VARCHAR2(1) DEFAULT ' ', LCCNTP VARCHAR2(1) DEFAULT ' ', PDCNTP VARCHAR2(1) DEFAULT ' ', LTCNTP VARCHAR2(1) DEFAULT ' ', BLNDCD VARCHAR2(2) DEFAULT ' ', CSPTNO VARCHAR2(25) DEFAULT ' ', UNITNM VARCHAR2(5) DEFAULT ' ', CTORCD VARCHAR2(3) DEFAULT ' ', ARTIGR VARCHAR2(2) DEFAULT ' ', CLASCD VARCHAR2(3) DEFAULT ' ', SRISCD VARCHAR2(4) DEFAULT ' ', ARSIGN VARCHAR2(3) DEFAULT ' ', APPLCT VARCHAR2(3) DEFAULT ' ', SERIES VARCHAR2(6) DEFAULT ' ', TYPECD VARCHAR2(4) DEFAULT ' ', CSCLCD VARCHAR2(3) DEFAULT ' ', PIN_QT NUMBER(5,0) DEFAULT 0, ARTICR VARCHAR2(10) DEFAULT ' ', MXSTQT NUMBER(9,0) DEFAULT 0, MISTQT NUMBER(9,0) DEFAULT 0, REMARK VARCHAR2(70) DEFAULT ' ', REMARS VARCHAR2(40) DEFAULT ' ', DRAWNO VARCHAR2(20) DEFAULT ' ', DRAWDT VARCHAR2(8) DEFAULT ' ', VAT_CD VARCHAR2(15) DEFAULT ' ', CASENW NUMBER(10,3) DEFAULT 0, CASEGK NUMBER(10,3) DEFAULT 0, P_C_NW NUMBER(6,2) DEFAULT 0, P_C_GW NUMBER(6,2) DEFAULT 0, BOX_GW NUMBER(6,2) DEFAULT 0, CASECDJP VARCHAR2(8) DEFAULT ' ', CASECDOV VARCHAR2(8) DEFAULT ' ', STNDUPUS NUMBER(15,5) DEFAULT 0, STNDUPYN NUMBER(15,5) DEFAULT 0, STNDUPS NUMBER(15,5) DEFAULT 0, STNDUPM NUMBER(15,5) DEFAULT 0, STNDUPHK NUMBER(15,5) DEFAULT 0, LOCA01 VARCHAR2(8) DEFAULT ' ', LOCA02 VARCHAR2(8) DEFAULT ' ', LOCA03 VARCHAR2(8) DEFAULT ' ', LOCA04 VARCHAR2(8) DEFAULT ' ', LOCA05 VARCHAR2(8) DEFAULT ' ', LOCA06 VARCHAR2(8) DEFAULT ' ', LOCA07 VARCHAR2(8) DEFAULT ' ', LOCA08 VARCHAR2(8) DEFAULT ' ', WRHSCD VARCHAR2(2) DEFAULT ' ', STKPUN NUMBER(4,0) DEFAULT 0, SMTSHL NUMBER(3,0) DEFAULT 0, INSTSF VARCHAR2(6) DEFAULT ' ', INSTPC VARCHAR2(20) DEFAULT ' ', INSTPG VARCHAR2(10) DEFAULT ' ', INSTDT DATE, UPDTSF VARCHAR2(6) DEFAULT ' ', UPDTPC VARCHAR2(20) DEFAULT ' ', UPDTPG VARCHAR2(10) DEFAULT ' ', UPDTDT DATE, CONSTRAINT PK_AMATS PRIMARY KEY (ARTICD) USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 TABLESPACE OVSALES STORAGE(INITIAL 64K NEXT 1M MINEXTENTS 1 MAXEXTENTS 2147483645 BUFFER_POOL DEFAULT) LOGGING ENABLE)PCTFREE 10MAXTRANS 255TABLESPACE OVSALESSTORAGE(INITIAL 10M NEXT 1M MINEXTENTS 1 MAXEXTENTS 2147483645 BUFFER_POOL DEFAULT)NOCACHELOGGING/COMMENT ON TABLE AMATS IS 'Article Master'/COMMENT ON COLUMN AMATS.ARTICD IS 'Article Code'/COMMENT ON COLUMN AMATS.ARTINM IS 'Article Name'/COMMENT ON COLUMN AMATS.ARTISN IS 'Article Short Name'/COMMENT ON COLUMN AMATS.DESCNM IS 'Description'/COMMENT ON COLUMN AMATS.IVSFCD IS 'Inventory Staff Code'/COMMENT ON COLUMN AMATS.SUPPCD IS 'Supplier Code'/COMMENT ON COLUMN AMATS.FACTCD IS 'Factory Code'/COMMENT ON COLUMN AMATS.MFG_UP IS 'Manufacturing Cost �Ë For Purchasing'/COMMENT ON COLUMN AMATS.MCUNIT IS 'Manufacturing Cost Unit'/COMMENT ON COLUMN AMATS.MFG_UP2 IS 'Manufacturing Cost 2 �Ë For other management '/COMMENT ON COLUMN AMATS.MCUNIT2 IS 'Manufacturing Cost 2 Unit'/COMMENT ON COLUMN AMATS.LSPRUP IS 'Last Purchasing Price'/COMMENT ON COLUMN AMATS.LPUNIT IS 'Last Purchasing Price Unit'/COMMENT ON COLUMN AMATS.APSLUP IS 'Appraisal Cost'/COMMENT ON COLUMN AMATS.APUNIT IS 'Appraisal Cost Unit'/COMMENT ON COLUMN AMATS.SLPRUT IS 'Sales Price Unit'/COMMENT ON COLUMN AMATS.CASEQT IS 'Case Qty'/COMMENT ON COLUMN AMATS.BOX_QT IS 'Box Qty'/COMMENT ON COLUMN AMATS.TRAYQT IS 'Tray Qty'/COMMENT ON COLUMN AMATS.CSSTCD IS 'Case Style Code'/COMMENT ON COLUMN AMATS.LEADTM IS 'Lead Time'/COMMENT ON COLUMN AMATS.DIV_TP IS 'Diversion Type �Ë 0:‰Â 1:“]—p�o‰×•s‰Â'/COMMENT ON COLUMN AMATS.POCRKB IS 'P/O Controle Type �Ë 0:No Standard 1:Standard 9:Planning production'/COMMENT ON COLUMN AMATS.PLANTP IS 'Plan �Ë 0:Plan Production 1:No Plan'/COMMENT ON COLUMN AMATS.STOCTP IS 'Stock Contorol Type �Ë 0:Controled 1:Non Controled'/COMMENT ON COLUMN AMATS.OTHRTP IS 'Other Article �Ë 0:Normal 1:Other'/COMMENT ON COLUMN AMATS.LTKPTP IS 'Lot Keep �Ë 0:NO 1:Case 2:Box 3:Tray'/COMMENT ON COLUMN AMATS.POSTTP IS 'P/O Stop Type �Ë 1:OK 2:NG'/COMMENT ON COLUMN AMATS.SOSPTP IS 'S/O Stop �Ë 1:OK 2:NG'/COMMENT ON COLUMN AMATS.SLSPTP IS 'Sales Stop �Ë 1:OK 2:NG'/COMMENT ON COLUMN AMATS.FOSPTP IS 'Forcust Stop �Ë 1:OK 2:NG'/COMMENT ON COLUMN AMATS.MFSPTP IS 'Manufacturing Stop �Ë 1:OK 2:NG'/COMMENT ON COLUMN AMATS.ASGNTP IS 'Assign Type �Ë 0:P/O first 1:Stock first 2:Stock only'/COMMENT ON COLUMN AMATS.ATASTP IS 'Auto Assign Type �Ë 0:Active 1:Stop'/COMMENT ON COLUMN AMATS.ASGNDY IS 'Assign Days �Ë Assign limit days'/COMMENT ON COLUMN AMATS.ROHSTP IS 'ROHS Type �Ë 0:Outside 1:ROHS OK 2:ROHS NG'/COMMENT ON COLUMN AMATS.LCCNTP IS 'Location Controled �Ë 0:Stock Controled for Location 1:Not controled'/COMMENT ON COLUMN AMATS.PDCNTP IS 'Product Date Controled �Ë 0:Stock Controled for Product date 1:Not controled'/COMMENT ON COLUMN AMATS.LTCNTP IS 'Lot No. Controled �Ë 0:Stock Controled for Lot no. 1:Not controled'/COMMENT ON COLUMN AMATS.BLNDCD IS 'Bland Code'/COMMENT ON COLUMN AMATS.CSPTNO IS 'Customer Parts No.'/COMMENT ON COLUMN AMATS.UNITNM IS 'Unit Name �Ë PC, KG , m etc.'/COMMENT ON COLUMN AMATS.CTORCD IS 'Contry Of Origin �Ë country code'/COMMENT ON COLUMN AMATS.ARTIGR IS 'Article Group'/COMMENT ON COLUMN AMATS.CLASCD IS 'Class Code'/COMMENT ON COLUMN AMATS.SRISCD IS 'Series Code'/COMMENT ON COLUMN AMATS.ARSIGN IS 'Sign �Ë “�”p�‡¥Šg”Ì‹ÖŽ~¥“ÁŽ¿“™‚Ì‹L�†'/COMMENT ON COLUMN AMATS.APPLCT IS 'Application �Ë �V•ª—Þº°ÄÞ'/COMMENT ON COLUMN AMATS.SERIES IS 'Series �Ë �V¼Ø°½Þº°ÄÞ'/COMMENT ON COLUMN AMATS.TYPECD IS 'Type �Ë �VÀ²Ìߺ°ÄÞ'/COMMENT ON COLUMN AMATS.CSCLCD IS 'Customes Clearance'/COMMENT ON COLUMN AMATS.PIN_QT IS 'Pin'/COMMENT ON COLUMN AMATS.ARTICR IS 'Color'/COMMENT ON COLUMN AMATS.MXSTQT IS 'Max Stock Qty'/COMMENT ON COLUMN AMATS.MISTQT IS 'Minmum Stock Qty'/COMMENT ON COLUMN AMATS.REMARK IS 'Remarks For P/O'/COMMENT ON COLUMN AMATS.REMARS IS 'Remarks'/COMMENT ON COLUMN AMATS.DRAWNO IS 'Drawing No.'/COMMENT ON COLUMN AMATS.DRAWDT IS 'Drawing No. Date'/COMMENT ON COLUMN AMATS.VAT_CD IS 'Vat Code �Ë CUSTOMS CODE for the Tax'/COMMENT ON COLUMN AMATS.CASENW IS 'Case N/W �Ë KG'/COMMENT ON COLUMN AMATS.CASEGK IS 'Case G/W �Ë KG'/COMMENT ON COLUMN AMATS.P_C_NW IS 'Pc N/W �Ë G'/COMMENT ON COLUMN AMATS.P_C_GW IS 'Pc G/W �Ë G'/COMMENT ON COLUMN AMATS.BOX_GW IS 'Box G/W �Ë KG'/COMMENT ON COLUMN AMATS.CASECDJP IS 'Case Code For Japan'/COMMENT ON COLUMN AMATS.CASECDOV IS 'Case Code For Overseas'/COMMENT ON COLUMN AMATS.STNDUPUS IS 'Standard Sales Price(Us$)'/COMMENT ON COLUMN AMATS.STNDUPYN IS 'Standard Sales Price(Yen)'/COMMENT ON COLUMN AMATS.STNDUPS IS 'Standard Sales Price(S$)'/COMMENT ON COLUMN AMATS.STNDUPM IS 'Standard Sales Price(M.$)'/COMMENT ON COLUMN AMATS.STNDUPHK IS 'Standard Sales Price(Hk$)'/COMMENT ON COLUMN AMATS.LOCA01 IS 'Location 1'/COMMENT ON COLUMN AMATS.LOCA02 IS 'Location 2'/COMMENT ON COLUMN AMATS.LOCA03 IS 'Location 3'/COMMENT ON COLUMN AMATS.LOCA04 IS 'Location 4'/COMMENT ON COLUMN AMATS.LOCA05 IS 'Location 5'/COMMENT ON COLUMN AMATS.LOCA06 IS 'Location 6'/COMMENT ON COLUMN AMATS.LOCA07 IS 'Location 7'/COMMENT ON COLUMN AMATS.LOCA08 IS 'Location 8'/COMMENT ON COLUMN AMATS.WRHSCD IS 'Warehouse Code'/COMMENT ON COLUMN AMATS.STKPUN IS 'Stock Keeping Unit'/COMMENT ON COLUMN AMATS.SMTSHL IS 'Surface Mount Technology Shelf Life'/COMMENT ON COLUMN AMATS.INSTSF IS 'Insert Staff'/COMMENT ON COLUMN AMATS.INSTPC IS 'Insert Pc'/COMMENT ON COLUMN AMATS.INSTPG IS 'Insert Program'/COMMENT ON COLUMN AMATS.INSTDT IS 'Insert Date'/COMMENT ON COLUMN AMATS.UPDTSF IS 'Update Staff'/COMMENT ON COLUMN AMATS.UPDTPC IS 'Update Pc'/COMMENT ON COLUMN AMATS.UPDTPG IS 'Update Program'/COMMENT ON COLUMN AMATS.UPDTDT IS 'Update Date'/
Can you advise, how do i able to create this table in my MSSQL server? |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-08-02 : 03:53:31
|
1. change NUMBER to NUMERIC2. change VARCHAR2 to VARCHAR3. make constraint likeCONSTRAINT PK_AMATS PRIMARY KEY (ARTICD)4. Remove the part belowPCTFREE 10INITRANS 2MAXTRANS 255TABLESPACE OVSALESSTORAGE(INITIAL 64K NEXT 1M MINEXTENTS 1 MAXEXTENTS 2147483645 BUFFER_POOL DEFAULT)LOGGINGENABLE)PCTFREE 10MAXTRANS 255TABLESPACE OVSALESSTORAGE(INITIAL 10M NEXT 1M MINEXTENTS 1 MAXEXTENTS 2147483645 BUFFER_POOL DEFAULT)NOCACHELOGGING 5. Replace COMMENT ON TABLE AMATS IS 'Article Master' etc with extended propertieshttp://msdn.microsoft.com/en-us/library/ms190243(v=sql.105).aspx------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
|
|
calvinkwoo3000
Yak Posting Veteran
98 Posts |
Posted - 2013-08-06 : 22:07:00
|
visakh16,Thank you very much,You always helpful and fast in action and accurate......Thank you! |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-08-07 : 01:04:25
|
welcome------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/https://www.facebook.com/VmBlogs |
|
|
|
|
|
|
|