Hi, I have a text file that contains MySQL statements for creating a table and inserting values into it. I am trying to figure out what the easiest way to import all the data into a access table. Is there an easy way to change the syntax to be able to use this code in Access?
Here is the code for the table and the data insert into statements...
CREATE TABLE shop_cart (
sessionid varchar(100) NOT NULL,
date datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
cart text NOT NULL,
name varchar(100),
sname varchar(100),
address1 varchar(100),
saddress1 varchar(100),
address2 varchar(100),
saddress2 varchar(100),
city varchar(100),
scity varchar(100),
state varchar(100),
sstate varchar(100),
postalcode varchar(100),
spostalcode varchar(100),
country varchar(100),
scountry varchar(100),
phone varchar(100),
sphone varchar(100),
fax varchar(100),
sfax varchar(100),
email varchar(100),
comments text,
status varchar(40) NOT NULL,
KEY sessionid (sessionid)
);
#
# Dumping data for table 'shop_cart'
#
INSERT INTO shop_cart VALUES( '1765986', '2001-07-09 15:55:46', '1;35;TurboCAD v7 Professional Version;399.00;1;33;TurboCAD v7 Standard Version;99.00;', '', '', '', '', '', '', '', '', 'WY', 'WY', '', '', 'US', 'US', '', '', '', '', '', '', 'complete');
INSERT INTO shop_cart VALUES( '7956868', '2001-12-04 03:31:46', '1;121;SolidMech Upgrade (3.3)<br>(CD Version);50.00;0;', 'HENRY J KOOISTRA', 'HENRY J KOOISTRA', '8815 GLEN LN', '8815 GLEN LN', '', '', 'TULSA', 'TULSA', 'OK', 'OK', '74131', '74131', 'US', 'US', '(918) 270-9767', '(918) 270-9767', '(918) 270-9330', '(918) 270-9330', 'hank.k@lmco.com', '', 'complete');
INSERT INTO shop_cart VALUES( '4381350', '2002-01-11 06:41:11', '1;121;SolidMech Upgrade (3.3)<br>(CD Version);50.00;0;', 'Arthur Keigler', 'Arthur Keigler', '20 Pine Plain Road', '20 Pine Plain Road', '', '', 'Wellesley', 'Wellesley', 'MA', 'MA', '02481', '02481', 'US', 'US', '781 910 5760', '781 910 5760', '781 239 9745', '781 239 9745', 'akeigler@mediaone.net', '', 'complete');
Any help would be greatly appreciated, I tried figuring out how to use the code, but I couldn't. Now I am stuck with text-to-columns the data in excel and that alone causes alot of problems because the delimiter character, the comma, is in some of the string/fields and is seperating alot of the fields that need to kept together???
Thanks,
Andres
Here is the code for the table and the data insert into statements...
CREATE TABLE shop_cart (
sessionid varchar(100) NOT NULL,
date datetime DEFAULT '0000-00-00 00:00:00' NOT NULL,
cart text NOT NULL,
name varchar(100),
sname varchar(100),
address1 varchar(100),
saddress1 varchar(100),
address2 varchar(100),
saddress2 varchar(100),
city varchar(100),
scity varchar(100),
state varchar(100),
sstate varchar(100),
postalcode varchar(100),
spostalcode varchar(100),
country varchar(100),
scountry varchar(100),
phone varchar(100),
sphone varchar(100),
fax varchar(100),
sfax varchar(100),
email varchar(100),
comments text,
status varchar(40) NOT NULL,
KEY sessionid (sessionid)
);
#
# Dumping data for table 'shop_cart'
#
INSERT INTO shop_cart VALUES( '1765986', '2001-07-09 15:55:46', '1;35;TurboCAD v7 Professional Version;399.00;1;33;TurboCAD v7 Standard Version;99.00;', '', '', '', '', '', '', '', '', 'WY', 'WY', '', '', 'US', 'US', '', '', '', '', '', '', 'complete');
INSERT INTO shop_cart VALUES( '7956868', '2001-12-04 03:31:46', '1;121;SolidMech Upgrade (3.3)<br>(CD Version);50.00;0;', 'HENRY J KOOISTRA', 'HENRY J KOOISTRA', '8815 GLEN LN', '8815 GLEN LN', '', '', 'TULSA', 'TULSA', 'OK', 'OK', '74131', '74131', 'US', 'US', '(918) 270-9767', '(918) 270-9767', '(918) 270-9330', '(918) 270-9330', 'hank.k@lmco.com', '', 'complete');
INSERT INTO shop_cart VALUES( '4381350', '2002-01-11 06:41:11', '1;121;SolidMech Upgrade (3.3)<br>(CD Version);50.00;0;', 'Arthur Keigler', 'Arthur Keigler', '20 Pine Plain Road', '20 Pine Plain Road', '', '', 'Wellesley', 'Wellesley', 'MA', 'MA', '02481', '02481', 'US', 'US', '781 910 5760', '781 910 5760', '781 239 9745', '781 239 9745', 'akeigler@mediaone.net', '', 'complete');
Any help would be greatly appreciated, I tried figuring out how to use the code, but I couldn't. Now I am stuck with text-to-columns the data in excel and that alone causes alot of problems because the delimiter character, the comma, is in some of the string/fields and is seperating alot of the fields that need to kept together???
Thanks,
Andres