Jump to content

How can I import the following into MySQL?


2levelsabove

Recommended Posts

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?

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.