Hello,
i just updated my mysql database from 4.0.x to 4.1 because i like to
have the possibility to create subqueries. My problem with the new
release is the following:
In my running project i have some tables with the column name True and
False.
In the old version it was possible to do a INSERT in the following
manner:
INSERT INTO
kinkedtube( observationID , expertID,TRUE, False)
VALUES ( 125,789, 0.235, 0.258);
Now with the new version 4.1. i get a MYSQL ERROR (SQL-State: 42000,
ErrorCode: 1064). I also know how to fix the problem, if i change the
statement to
INSERT INTO
kinkedtube( observationID , expertID,kinkedtube.TRUE,
kinkedtube.False)
VALUES ( 1020,1020, 0.235, 0.258);
I dont get an error and the data get inserted in my db;
But i dont want to chance my database or my java code, so how can i
tell the mysql database that it does insert the record without adding
the table name / alias to the column name. ( Oh, something else: It is
important that the tablename is written casesensetive. If you write
KINKEDTUBE.true i also get an error).
Thanks a lot for your help and advice. Have a good one ...
Elmar 2 5574
> But i dont want to chance my database or my java code,
The way I see it, you don't have any choice.
True and False are now used by MySql as aliases... of course you know
this now... http://www.mysql.com/doc/en/MaxDB_Reserved_Words.html
BOOLEAN was added in MySQL version 4.1.0; it is a synonym for BOOL which
is mapped to TINYINT(1). It accepts integer values in the same range as
TINYINT as well as NULL. TRUE and FALSE can be used as aliases for 1 and 0.
Elmar Grandel wrote: Hello, i just updated my mysql database from 4.0.x to 4.1 because i like to have the possibility to create subqueries. My problem with the new release is the following: In my running project i have some tables with the column name True and False. In the old version it was possible to do a INSERT in the following manner:
INSERT INTO kinkedtube( observationID , expertID,TRUE, False) VALUES ( 125,789, 0.235, 0.258);
Now with the new version 4.1. i get a MYSQL ERROR (SQL-State: 42000, ErrorCode: 1064). I also know how to fix the problem, if i change the statement to
INSERT INTO kinkedtube( observationID , expertID,kinkedtube.TRUE, kinkedtube.False) VALUES ( 1020,1020, 0.235, 0.258);
I dont get an error and the data get inserted in my db; But i dont want to chance my database or my java code, so how can i tell the mysql database that it does insert the record without adding the table name / alias to the column name. ( Oh, something else: It is important that the tablename is written casesensetive. If you write KINKEDTUBE.true i also get an error). Thanks a lot for your help and advice. Have a good one ... Elmar
> But i dont want to chance my database or my java code,
The way I see it, you don't have any choice.
True and False are now used by MySql as aliases... of course you know
this now... http://www.mysql.com/doc/en/MaxDB_Reserved_Words.html
BOOLEAN was added in MySQL version 4.1.0; it is a synonym for BOOL which
is mapped to TINYINT(1). It accepts integer values in the same range as
TINYINT as well as NULL. TRUE and FALSE can be used as aliases for 1 and 0.
Elmar Grandel wrote: Hello, i just updated my mysql database from 4.0.x to 4.1 because i like to have the possibility to create subqueries. My problem with the new release is the following: In my running project i have some tables with the column name True and False. In the old version it was possible to do a INSERT in the following manner:
INSERT INTO kinkedtube( observationID , expertID,TRUE, False) VALUES ( 125,789, 0.235, 0.258);
Now with the new version 4.1. i get a MYSQL ERROR (SQL-State: 42000, ErrorCode: 1064). I also know how to fix the problem, if i change the statement to
INSERT INTO kinkedtube( observationID , expertID,kinkedtube.TRUE, kinkedtube.False) VALUES ( 1020,1020, 0.235, 0.258);
I dont get an error and the data get inserted in my db; But i dont want to chance my database or my java code, so how can i tell the mysql database that it does insert the record without adding the table name / alias to the column name. ( Oh, something else: It is important that the tablename is written casesensetive. If you write KINKEDTUBE.true i also get an error). Thanks a lot for your help and advice. Have a good one ... Elmar This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: dave |
last post by:
Hello there,
I am at my wit's end ! I have used the following script succesfully to
upload an image to my web space. But what I really want to be able to do is
to update an existing record in a...
|
by: Tom Martin |
last post by:
I'm a Java Web developer NEWBIE that has inherited a website that
fails every 2 hours due to poor connection pooling between Tomcat
4.0.6 and mySQL. In efforts to resolve this problem, I've...
|
by: Elmar Grandel |
last post by:
Hello,
i just updated my mysql database from 4.0.x to 4.1 because i like to
have the possibility to create subqueries. My problem with the new
release is the following:
In my running project i...
|
by: Peter Frost |
last post by:
Please help
I don't know if this is possible but what I would really like to do is
to use On Error Goto to capture the code that is being executed when
an error occurs.
Any help would be much...
|
by: Jon |
last post by:
I'm learning about datatables. When using the example provided by MS in the
..NET Framework Class Library for DATATABLE (see below) I get an error on line
3 that says "Type expected". Is something...
|
by: zfraile |
last post by:
I'm getting this error from the JIT compiler at runtime, but only on my boss'
machine, not my development machine. I believe the error is generated from a
call to an Excel object, but I can't tell...
|
by: Abdhul Saleem |
last post by:
Hi,
I am recieving error ActiveX component can't create object in the following
line in the asp page.
set ExcelApp = CreateObject("Excel.Application")
Previously this code was working fine....
|
by: Atli |
last post by:
This is an easy to digest 12 step guide on basics of using MySQL. It's a great refresher for those who need it and it work's great for first time MySQL users.
Anyone should be able to get...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
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: 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: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |