errors in mysql syntax

2007-09-27 Thread RAMYA
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

Re: mysql syntax

2005-04-19 Thread gerald_clark
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

RE: mysql syntax

2005-04-19 Thread SGreen
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

RE: mysql syntax

2005-04-19 Thread Rich Brant
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 =

Re: mysql syntax

2005-04-19 Thread SGreen
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

mysql syntax

2005-04-19 Thread Rich Brant
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

Re: Newbie: mysql syntax error question

2005-03-20 Thread Michael Stassen
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.

Newbie: mysql syntax error question

2005-03-19 Thread Graham Anderson
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.

Re: How to diagnose MySQL syntax error

2004-03-29 Thread beacker
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

How to diagnose MySQL syntax error

2004-03-29 Thread Ken Elder
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

Re: MySQL syntax question

2003-09-04 Thread Diana Soares
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

MySQL syntax question

2003-09-04 Thread Darryl Hoar
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

Re: strange mysql syntax error

2003-02-20 Thread Diana Soares
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

strange mysql syntax error

2003-02-20 Thread kubicek
>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

Re: MySQL syntax different from Microsoft SQL syntax...Please HELP

2002-03-18 Thread Paul DuBois
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

Re: MySQL syntax different from Microsoft SQL syntax...Please HELP

2002-03-18 Thread Christopher Thompson
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

MySQL syntax different from Microsoft SQL syntax...Please HELP

2002-03-18 Thread John Burns
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

Q: problem with MySQL syntax in Apple WebObjects

2001-09-25 Thread Alex Yu
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

Re: Mysql syntax

2001-07-20 Thread Allen Grace
- 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

Mysql syntax

2001-07-20 Thread temu-jin
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