right syntax to use near 'CONSTRAINT
FK_WorksOn_Users FOREIGN KEY
(
UserID
) REFERENCES TimeTracke' at line 8
what to do if this error comes plz anyone help me
--
View this message in context:
http://www.nabble.com/errors-in-mysql-syntax-tf45
Rich Brant wrote:
I forgot the important part: what I want is to filter on a userID in the
person table such as -
SELECT u.Username, p.UserID
FROM Users u LEFT OUTER JOIN
Person p ON u.UserID = p.UserID
WHERE (p.UserID = 5) OR
(p.UserID IS
gt;
> SELECT u.Username, p.UserID
> FROM Users u LEFT OUTER JOIN
> Person p ON u.UserID = p.UserID
> WHERE (p.UserID = 5) OR
> (p.UserID IS NULL)
>
> THis will return both the matching recs from the user table and NU
Subject: Re: mysql syntax
Rich Brant <[EMAIL PROTECTED]> wrote on 04/19/2005 03:05:51 PM:
> I'm used to doing something simple such as the following in sql server:
>
> SELECT u.Username, p.UserID
> FROM Users u LEFT JOIN
>Person p ON u.UserID =
Rich Brant <[EMAIL PROTECTED]> wrote on 04/19/2005 03:05:51 PM:
> I'm used to doing something simple such as the following in sql server:
>
> SELECT u.Username, p.UserID
> FROM Users u LEFT JOIN
>Person p ON u.UserID = p.UserID
>
> However, I'm not seeing the same results i
I'm used to doing something simple such as the following in sql server:
SELECT u.Username, p.UserID
FROM Users u LEFT JOIN
Person p ON u.UserID = p.UserID
However, I'm not seeing the same results in MySQL. I don't get all
the recs in the users table and NULLs in the userID c
Graham Anderson wrote:
My server has mysql: version 3.23.58
// Performing SQL query
SELECT cities.city, regions.region, countries.country
FROM cities
JOIN subnets on subnets.cityid=subnets.cityid
^^^
Shouldn't that be
JOIN subnets on subnets.cityid=cities.
My server has mysql: version 3.23.58
// Performing SQL query
SELECT cities.city, regions.region, countries.country
FROM cities
JOIN subnets on subnets.cityid=subnets.cityid
JOIN regions on subnets.regionid=regions.regionid
JOIN countries on subnets.countryid=countries.countryid
where subnets.
Ken Elder writes:
>Today I experimented on two computers. One consistently got the error
>message; the other consistently did not get the error message. Both
>computers were Win98SE with IE6.0. Their Win 98 and IE settings were
>identical (except for trivial stuff like home page and mouse contro
SQL gurus:
A few days ago we went live with a PHP/MySQL site. One of the pages
requires entry of a username and password. If a corresponding record is
found in the password table, the next page appears.
The authentication technique we used was a session variable. For most
users, but not all, t
Hi,
Have a look at:
http://www.mysql.com/doc/en/String_functions.html
You can find there functions to use in SELECT and WHERE clauses, like
UPPER(), LOWER(), SUBSTRING(), etc. and
http://www.mysql.com/doc/en/String_comparison_functions.html
for string comparison functions (LIKE, REGEXP, MATCH
greetings,
When I am doing a select or update statement, I was wondering if there were
functions to compare strings. IE
Select * from employee,emp2 where uppercase(employee.fname)
matches(emp2.fname*)
that is to compare two fields from two tables and see if they match
regardless of whether
one i
Hi,
md5 is a function name, maybe that's why you need to quote the field
name. Check the MySQL manual about that.
On Thu, 2003-02-20 at 10:51, [EMAIL PROTECTED] wrote:
> >Description:
> syntax checker reject length restriction when index char column
> with ending by number.
>
> >How-To-R
>Description:
syntax checker reject length restriction when index char column
with ending by number.
>How-To-Repeat:
alter table xmlmd5 add index md5 (md5(10));
ERROR 1064: You have an error in your SQL syntax near 'md5(10))' at line 1
column definition of md5 is md
At 18:15 -0500 3/18/02, John Burns wrote:
>I've looked throught the MySQL documentation and I can't seem to find the
>answer to this problem. I have a query that will work on a Microsoft SQL
>server, but I've tried moving it to a MySQL server and it won't work. I
>tried modifying it and I can't
What error message do you get? Have you tried fully spelling out your join
condition's table names? Have you tried specifying that you are doing a LEFT
join? Have you tried using USING instead of ON?
On Monday 18 March 2002 4:15 pm, John Burns wrote:
> I've looked throught the MySQL document
I've looked throught the MySQL documentation and I can't seem to find the
answer to this problem. I have a query that will work on a Microsoft SQL
server, but I've tried moving it to a MySQL server and it won't work. I
tried modifying it and I can't get it to work either. The scenario and
synta
Hello,
I am using mm mysql JDBC driver to connect WO5 to MySQL, but I am having
a problem with INSERT. It seems like WO is executing this command for
inserting a new field.
INSERT INTO test(ID, abc, def, ghi) VALUES (129, '', 'test',
'test')
But MySQL does not understand it. It needs a
- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, July 21, 2001 12:33 PM
Subject: Mysql syntax
> If I wanted to asssign John Doe to system1, how would I write the
statement in sql to pull the sysid from the > system table via the sy
I have been trying to figure out how to do this, and I am sure that I am just
overlooking somthing small.
Suppose I create two tables as follows:
CREATE TABLE system (
sysid INT NOT NULL UNSIGNED AUTO_INCREMENT PRIMARY KEY,
sysname VARCHAR(12),
os VARCHAR(10),
cpumhz INT
);
CRE
20 matches
Mail list logo