At 14:28 +0000 1/7/03, [EMAIL PROTECTED] wrote:
Hiya.
I have inherited an Access database whose originator has used the #
character in
field names as you can see below. I would like to replace this with
a MySQL served
version. This is part of the script created by ACCESSDump.
DROP DATABASE cd2;
CREATE DATABASE if not exists cd2;
USE cd2;
select 'tblAction';
CREATE TABLE if not exists tblAction (
Action# INT AUTO_INCREMENT NOT NULL,
lngActionName INT,
DefaultPriority INT,
UserPriority INT,
SumRecs INT,
LastAutoexecItemDate DATETIME,
LastAutoexecDate DATETIME,
DayNum INT,
INDEX lngActionName ( lngActionName ),
PRIMARY KEY ( Action# )
);
INSERT INTO tblAction VALUES('34','1','1','0','0','','','3');
INSERT INTO tblAction VALUES('35','2','2','0','0','','','3');
.
.
.
My problem is that MySQL treats # as a comment delimiter 'till the
end of the line' and
hence the script bombs after the line containing it. I could change
# to something
safe like _, but unfortunately, and at the moment, we are still
having to use an Access
front end. This is very substantial, complicated and has almost
every form, query,
report, module and macro using the # character.
I have tried to use the ` character as mentioned at
http://www.mysql.com/doc/en/Legal_names.html to delimit the field name. This
doesn't seem to work.
Can anyone help please.
Thanks.
-- Russell Curgenven
-- System Administrator
-- Community Recycling Network
-- +44 (0)117 942 0142
-- www.crn.org.uk
Are you issuing these queries from within the mysql client? # should
be legal within `-quoted names, but the mysql parser isn't quite the
same as the one used by the server, and # in names confuses it, even
if they are quoted.
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php