2levelsabove Posted February 3, 2010 Share Posted February 3, 2010 Bought a zipcode database and now kind of confused on how to import. For example if I use cpanel and try cuting and pasting the following code, it fails: CREATE TABLE [ZIP] ( [ZIP] [char] (5) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [sTATE] [char] (2) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [CITY] [char] (28) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [TYP] [char] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [FIPS] [char] (5) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [LAT] [float] NULL , [LNG] [float] NULL , [A_C] [char] (3) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [FINANCE] [char] (6) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [LL] [char] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [FAC] [char] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [MSA] [char] (4) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [PMSA] [char] (4) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [FILLER] [char] (3) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ) ON [PRIMARY] GO What format is this? Quote Link to comment https://forums.phpfreaks.com/topic/190832-how-can-i-import-the-following-into-mysql/ Share on other sites More sharing options...
Mchl Posted February 3, 2010 Share Posted February 3, 2010 I'm guessing it's MSSQL's T-SQL Quote Link to comment https://forums.phpfreaks.com/topic/190832-how-can-i-import-the-following-into-mysql/#findComment-1006355 Share on other sites More sharing options...
2levelsabove Posted February 3, 2010 Author Share Posted February 3, 2010 I tried importing it using that but get the following: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '[ZIP] ( [ZIP] [char] (5) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [sTATE]' at line 1 Quote Link to comment https://forums.phpfreaks.com/topic/190832-how-can-i-import-the-following-into-mysql/#findComment-1006360 Share on other sites More sharing options...
Mchl Posted February 3, 2010 Share Posted February 3, 2010 Yeah. It's not MySQL compatible. Try looking for convertion tools from MSSQL to MySQL Quote Link to comment https://forums.phpfreaks.com/topic/190832-how-can-i-import-the-following-into-mysql/#findComment-1006368 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.