Click to See Complete Forum and Search --> : phymyadmin sql file import troubles


kanji2150
May 12th, 2004, 12:38 PM
Hey guys, I've created a database using phymyadmin. I have a table called tblmain. I need to import a few thousand records into this table and I was hoping to use an sql file import of some sort. First and foremost, I cannot get phpmyadmin to recognize an sql import directory so I tried to just copy and paste the contents of the file into an sql query that I ran on tblmain and it keeps giving me errors after errors and then some more errors! My syntax is obviously wrong so could someone please help me out here? The process halts on the first line so here is that line:

INSERT INTO 'tblmain' ('AssetTagNo', 'Description', 'LName', 'RoomNo', 'RoomDetails', 'Location', 'Department') VALUES (7905054419,'Dell GX110 Desktop-866mhz 256mb 20gb','BRIGNOLA',205,NULL,'BULEY LIBRARY','ACADEMIC COMPUTER CENTER');

Below is the structure of the table (exported from phymyadmin):
CREATE TABLE `tblmain` (
`AssetTagNo` int(10) NOT NULL default '0',
`Description` text(50) NOT NULL default '',
`LName` text(25) NOT NULL default '',
`RoomNo` smallint(3) NOT NULL default '0',
`RoomDetails` text(30) NOT NULL default '',
`Location` text(30) NOT NULL default '',
`Department` text(30) NOT NULL default '',
PRIMARY KEY (`AssetTagNo`)
) TYPE=MyISAM;

Thanks in advance for the help guys!
-Jason

kanji2150
May 12th, 2004, 11:11 PM
Nevermind, I solved the problem. I found out that when I write in the field names in the insert statement that they shouldn't be encased in '.