Warning: Error while executing this query:CREATE TABLE "purchaseorder" (
"PurchaseOrderID" int(10) unsigned NOT NULL auto_increment,
"PurchaseCost" double unsigned zerofill NOT NULL default
'0000000000000000000000',
"PurchaseDescription" varchar(255) character set latin1 collate latin1_bin
NOT NULL default '',
"PurchaseeBayReference" varchar(45) default NULL,
"PurchaseNotes" varchar(255) NOT NULL default '',
"PurchasePicture" mediumblob NOT NULL,
"PurchaseQuantity" int(10) unsigned NOT NULL default '0',
"PurchaseOrderInvoiceID" int(10) unsigned NOT NULL default '0',
"PurchaseDate" datetime NOT NULL default '2004-01-01 00:00:00',
"PurchaseOrderCurrencySymbol" varchar(4) NOT NULL default '£',
"PurchasePostage" double NOT NULL default '0',
PRIMARY KEY ("PurchaseOrderID"),
UNIQUE KEY "idx_eBayRef" ("PurchaseeBayReference"),
KEY "FK_purchaseorder_1" ("PurchaseOrderInvoiceID"),
CONSTRAINT "purchaseorder_ibfk_3" FOREIGN KEY ("PurchaseOrderInvoiceID")
REFERENCES "purchaseorderinvoice" ("PurchaseOrderInvoiceID")
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='InnoDB free: 11264 kB;
(`SupplierID`) REFER `purpleflavours/';
The server has returned this error message: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 '"purchaseorder" (
"PurchaseOrderID" int(10) unsigned NOT NULL auto_increment,
' at line 1
Can anyone explain what I am doing wrong here please!
Thanks
James West 3 2484
J West wrote: Warning: Error while executing this query:CREATE TABLE "purchaseorder" ( "PurchaseOrderID" int(10) unsigned NOT NULL auto_increment, "PurchaseCost" double unsigned zerofill NOT NULL default '0000000000000000000000', "PurchaseDescription" varchar(255) character set latin1 collate latin1_bin NOT NULL default '', "PurchaseeBayReference" varchar(45) default NULL, "PurchaseNotes" varchar(255) NOT NULL default '', "PurchasePicture" mediumblob NOT NULL, "PurchaseQuantity" int(10) unsigned NOT NULL default '0', "PurchaseOrderInvoiceID" int(10) unsigned NOT NULL default '0', "PurchaseDate" datetime NOT NULL default '2004-01-01 00:00:00', "PurchaseOrderCurrencySymbol" varchar(4) NOT NULL default '£', "PurchasePostage" double NOT NULL default '0', PRIMARY KEY ("PurchaseOrderID"), UNIQUE KEY "idx_eBayRef" ("PurchaseeBayReference"), KEY "FK_purchaseorder_1" ("PurchaseOrderInvoiceID"), CONSTRAINT "purchaseorder_ibfk_3" FOREIGN KEY ("PurchaseOrderInvoiceID") REFERENCES "purchaseorderinvoice" ("PurchaseOrderInvoiceID") ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='InnoDB free: 11264 kB; (`SupplierID`) REFER `purpleflavours/'; The server has returned this error message: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 '"purchaseorder" ( "PurchaseOrderID" int(10) unsigned NOT NULL auto_increment, ' at line 1
Can anyone explain what I am doing wrong here please!
Thanks
James West
I'm just pulling at straws here as I've been unable to test it - However
you use a hook instead of an apostraphe after your REFER... and why
escape it?
Thus why the following:
REFER 'purpleflavours/';
Why not:
REFER 'purpleflavours/';
I also think that you have an imbalance of ( though I cannot find
where... I've got about a years MySQL behind me - little of it in a work
environment, so I could well be wrong... however I believe the correct
syntax for CREATE TABLE is
CREATE TABLE "tablename"
(
cell structure....
PRIMARY KEY...
);
You have an open bracket after your table name - but I cannot find where
it is closed...
I hope something above helps you in the right direction...
randelld
Thanks for that ! The SQL was automatically generated by MySQL Administrator
as part of a restore from a backup! I have not included the whole syntax as
it is 64 MB!!!!!
I have only been using MySQL for three weeks and it's lack of stability is
doing my head in!
I think I'll go back to using MSSQL for the time being until the tools
mature a little more!
Regards
James West
"Randell D." <re******************************@fiprojects.moc > wrote in
message news:GtbRd.416388$Xk.274429@pd7tw3no... J West wrote:
Warning: Error while executing this query:CREATE TABLE "purchaseorder" ( "PurchaseOrderID" int(10) unsigned NOT NULL auto_increment, "PurchaseCost" double unsigned zerofill NOT NULL default '0000000000000000000000', "PurchaseDescription" varchar(255) character set latin1 collate latin1_bin NOT NULL default '', "PurchaseeBayReference" varchar(45) default NULL, "PurchaseNotes" varchar(255) NOT NULL default '', "PurchasePicture" mediumblob NOT NULL, "PurchaseQuantity" int(10) unsigned NOT NULL default '0', "PurchaseOrderInvoiceID" int(10) unsigned NOT NULL default '0', "PurchaseDate" datetime NOT NULL default '2004-01-01 00:00:00', "PurchaseOrderCurrencySymbol" varchar(4) NOT NULL default '£', "PurchasePostage" double NOT NULL default '0', PRIMARY KEY ("PurchaseOrderID"), UNIQUE KEY "idx_eBayRef" ("PurchaseeBayReference"), KEY "FK_purchaseorder_1" ("PurchaseOrderInvoiceID"), CONSTRAINT "purchaseorder_ibfk_3" FOREIGN KEY ("PurchaseOrderInvoiceID") REFERENCES "purchaseorderinvoice" ("PurchaseOrderInvoiceID") ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='InnoDB free: 11264 kB; (`SupplierID`) REFER `purpleflavours/'; The server has returned this error message: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 '"purchaseorder" ( "PurchaseOrderID" int(10) unsigned NOT NULL auto_increment, ' at line 1
Can anyone explain what I am doing wrong here please!
Thanks
James West
I'm just pulling at straws here as I've been unable to test it - However you use a hook instead of an apostraphe after your REFER... and why escape it?
Thus why the following:
REFER 'purpleflavours/';
Why not: REFER 'purpleflavours/';
I also think that you have an imbalance of ( though I cannot find where... I've got about a years MySQL behind me - little of it in a work environment, so I could well be wrong... however I believe the correct syntax for CREATE TABLE is
CREATE TABLE "tablename" ( cell structure.... PRIMARY KEY... );
You have an open bracket after your table name - but I cannot find where it is closed...
I hope something above helps you in the right direction... randelld
J West wrote: Thanks for that ! The SQL was automatically generated by MySQL Administrator as part of a restore from a backup! I have not included the whole syntax as it is 64 MB!!!!!
I have only been using MySQL for three weeks and it's lack of stability is doing my head in! I think I'll go back to using MSSQL for the time being until the tools mature a little more!
Regards
James West
I can't say I know MySQL well enough to argue your points, but honestly,
I think you should stick with MySQL - I don't think its a stability
issue (though maybe it is on a windows environment). I've seen it (no
never administered it) in use from v3 running databases with several
hundred thousands of records and it works fine and dandy. In addition,
I believe independant tests comparing like for like features with an
Oracle database makes MySQL win hands down... others might flame me on
this because Oracle contains additional features not (yet?) found in
MySQL that makes chewing data better... but if you were to compare
exactly like for like, MySQL is a damned fine piece of work...
anyway...
hope you find the bug in your earlier query - and thanks for the earlier
join help...
randelld This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: eric |
last post by:
Is it possible to have part of a table name used in a CREATE statement
contained in a variable? Here's what I'd like to do, although
obviously the syntax of this isn't quite right or I wouldn't be...
|
by: Baoqiu Cui |
last post by:
Hi,
I was playing with MySQL (4.1.9) during the weekend, but noticed a minor
problem and would like someone to explain this to me.
Basically I could successfully create a table with one unique...
|
by: Karen Sullivan |
last post by:
Hi, all. I'm fairly new to SQL, and I have been trying to create a table
from a text file. I have been looking at this for days, and can't find the
problem. I get a syntax error " Line 55:...
|
by: Alicia |
last post by:
Does anyone know why I am getting a "Syntax error in Create Table
statement". I am using Microsoft Access SQL View to enter it. Any
other problems I may run into?
CREATE TABLE weeks
(...
|
by: Albretch |
last post by:
.. I am trying to create a database in a MS Access DB via JDBC drivers.
I have tried both sun.jdbc.odbc.JdbcOdbcDriver and ids.sql.IDSDriver
From some reason both drivers Exceptions tell me...
| |
by: Maverick |
last post by:
If i try to create foxpro table by the following "sql" statment, the C#
compiler will only return an error "xxxx not support in non-dbc version". The
"index on" command statement return some kind...
|
by: Wayne Wengert |
last post by:
I am trying to create a VB.NET Windows application to move some data from a
local Access DB table to a table in a SQL Server. The approach I am trying
is to open an OLEDB connection to the local...
|
by: Ying Lu |
last post by:
Hello,
I have a table named "USER" under MySQL database. When I am trying to
move tables from MySQL to PostgreSQL, I found that I could not create a
table namely "USER". I guess "USER" is a key...
|
by: lakuma |
last post by:
Hi,
I have a table called A (say) with columns called name, place, animal and thing.
I would want to write an on insert trigger on this table, which would create a table with the name of the...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |