Link to home
Start Free TrialLog in
Avatar of Bill Henderson
Bill HendersonFlag for United States of America

asked on

SQL query syntax error?

HI,

I'm trying to run an sql file into a MySQL database - I've done this with numerous tables so far, but one table is tripping me up. I'm getting:

Error in query (1064): Syntax error near '"FirstCallDataID" INTEGER(5) NOT NULL PRIMARY KEY , "VictimID" INTEGER(5) NOT ' at line 2

Here is my query and the first couple records (privatized) - is there anything obviously wrong with this query? I don't see a problem:

CREATE TABLE IF NOT EXISTS FirstCallData(
  "FirstCallDataID" INTEGER(5) NOT NULL PRIMARY KEY 
, "VictimID" INTEGER(5) NOT NULL
, "SurvivorNameFirst" VARCHAR(50)
, "SurvivorNameLast" VARCHAR(50)
, "SurvivorAddress" VARCHAR(50)
, "SurvivorCity" VARCHAR(50)
, "SurvivorState" VARCHAR(50)
, "SurvivorZip" VARCHAR(50)
, "SurvivorPhone" VARCHAR(100)
, "SurvivorPhoneAlternate" VARCHAR(100)
, "SurvivorComments" VARCHAR(1000)
, "SurvivorRelationshiptoVictim" VARCHAR(100)
, "CreatedAccount" VARCHAR(17) NOT NULL
, "CreatedDate" DATE  NOT NULL
, "CreatedTime" VARCHAR(8)
, "ModifiedAccount" VARCHAR(13) NOT NULL
, "ModifiedDate" DATE  NOT NULL
, "ModifiedTime" VARCHAR(8)
);
INSERT INTO FirstCallData("FirstCallDataID","VictimID","SurvivorNameFirst","SurvivorNameLast","SurvivorAddress","SurvivorCity","SurvivorState","SurvivorZip","SurvivorPhone","SurvivorPhoneAlternate","SurvivorComments","SurvivorRelationshiptoVictim","CreatedAccount","CreatedDate","CreatedTime","ModifiedAccount","ModifiedDate","ModifiedTime") VALUES (1,1343,'','','','','','','','','','','Persons Name','2008-05-24','','username','2013-05-11','20:22:23');
INSERT INTO FirstCallData("FirstCallDataID","VictimID","SurvivorNameFirst","SurvivorNameLast","SurvivorAddress","SurvivorCity","SurvivorState","SurvivorZip","SurvivorPhone","SurvivorPhoneAlternate","SurvivorComments","SurvivorRelationshiptoVictim","CreatedAccount","CreatedDate","CreatedTime","ModifiedAccount","ModifiedDate","ModifiedTime") VALUES (2,692,'FName','LName','123 Main St','City','ST','55555','555-555-5555','','disconnected #, please try mailing letter','Mother','isername','2008-05-25','','username','2009-06-10','16:22:59');

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Mayank Gairola
Mayank Gairola
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Bill Henderson

ASKER

That did it. Thanks for the help! Unfortunately I have another syntax error that isn't caused by quotes. I'm asking that one separately.