Syntax Question Constraint, Index

2006-04-03 Thread Scott Purcell
I ran into some syntax over the weekend, that I am trying to make sense of. Here is the create table statements. Drop table if exists events Drop table if exists locations Create table events ( uid BIGINT NOT NULL AUTO_INCREMENT, name VARCHAR(255), start_date DATE, duration INTEGER,

Re: Syntax Question Constraint, Index

2006-04-03 Thread Martijn Tonies
Create table events ( uid BIGINT NOT NULL AUTO_INCREMENT, name VARCHAR(255), start_date DATE, duration INTEGER, location_id BIGINT, primary key (uid) ); Create table locations ( uid BIGINT NOT NULL AUTO_INCREMENT, name VARCHAR(255), address VARCHAR(255), primary key (uid) ) Alter table events

Alter table syntax question -

2006-03-01 Thread bobgoodwin
I am running MySql 4.1.6 in FC-4 Linux amd it is a huge learning exercise for me! I am using O'Reilly's MYSQL Cookbook, have gone through numerous pages of the reference manual and stuff on Google but still can get the proper commands and syntax to alter the following table T1. I would

Re: Alter table syntax question -

2006-03-01 Thread gerald_clark
bobgoodwin wrote: I am running MySql 4.1.6 in FC-4 Linux amd it is a huge learning exercise for me! I am using O'Reilly's MYSQL Cookbook, have gone through numerous pages of the reference manual and stuff on Google but still can get the proper commands and syntax to alter the following

Re: syntax question..

2004-11-15 Thread kalin mintchev
- Original Message - From: kalin mintchev [EMAIL PROTECTED] To: Adam [EMAIL PROTECTED] Cc: MySQL General [EMAIL PROTECTED] Sent: Sunday, November 14, 2004 11:33 PM Subject: Re: syntax question.. Kalin, Kalin thanks to all... yes, Rhino - i'm new. my first Kalin post

Re: syntax question..

2004-11-15 Thread Rhino
I think you need to do something like this: select t1.data from table1 t1 inner join table2 t2 on t1.zip = t2.zip where t2.chain like '%carmike%'; i tried this one... it seams to work. i'll read a bit more about joins .. thank you... appreciate it... You're welcome! Rhino --

syntax question..

2004-11-14 Thread kalin mintchev
hi everybody.. can somebody please explain what is wrong with this command: select t1.data from table1 as t1 where t1.zip=(select * from table2 as t2 where t2.chain like %carmike%); thank you... -- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To

RE: syntax question..

2004-11-14 Thread Peter Lovatt
November 2004 23:06 To: [EMAIL PROTECTED] Subject: syntax question.. hi everybody.. can somebody please explain what is wrong with this command: select t1.data from table1 as t1 where t1.zip=(select * from table2 as t2 where t2.chain like %carmike%); thank you... -- -- MySQL General

Re: syntax question..

2004-11-14 Thread Jeff Smelser
On Sunday 14 November 2004 05:05 pm, kalin mintchev wrote: can somebody please explain what is wrong with this command: select t1.data from table1 as t1 where t1.zip=(select * from table2 as t2 where t2.chain like %carmike%); If your no usiing 4.1, subselects are not even allowed.. If so..

Re: syntax question..

2004-11-14 Thread Rhino
- Original Message - From: kalin mintchev [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, November 14, 2004 6:05 PM Subject: syntax question.. hi everybody.. can somebody please explain what is wrong with this command: select t1.data from table1 as t1 where t1.zip=(select

Re: syntax question..

2004-11-14 Thread Rhino
- Original Message - From: kalin mintchev [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, November 14, 2004 6:05 PM Subject: syntax question.. hi everybody.. can somebody please explain what is wrong with this command: select t1.data from table1 as t1 where t1.zip=(select

RE: syntax question..

2004-11-14 Thread kalin mintchev
. you may also cause a conflict by using the database alias (t1) as the name of the result Peter -Original Message- From: kalin mintchev [mailto:[EMAIL PROTECTED] Sent: 14 November 2004 23:06 To: [EMAIL PROTECTED] Subject: syntax question.. hi everybody.. can somebody please explain

Re: syntax question..

2004-11-14 Thread Adam
Kalin, Kalin thanks to all... yes, Rhino - i'm new. my first Kalin post. the version is the problem indeed. it's Kalin 4.0.13-standard. how would i achieve the same Kalin query in this version?... You'll need to provide the following: (1) What is the result you want to achieve? (2) What are the

Re: syntax question..

2004-11-14 Thread kalin mintchev
Kalin, Kalin thanks to all... yes, Rhino - i'm new. my first Kalin post. the version is the problem indeed. it's Kalin 4.0.13-standard. how would i achieve the same Kalin query in this version?... You'll need to provide the following: (1) What is the result you want to achieve? well:

Re: syntax question..

2004-11-14 Thread Rhino
- Original Message - From: kalin mintchev [EMAIL PROTECTED] To: Adam [EMAIL PROTECTED] Cc: MySQL General [EMAIL PROTECTED] Sent: Sunday, November 14, 2004 11:33 PM Subject: Re: syntax question.. Kalin, Kalin thanks to all... yes, Rhino - i'm new. my first Kalin post

RE: SQL Syntax Question

2004-08-04 Thread Karl-Heinz Schulz
-Heinz Schulz; [EMAIL PROTECTED] Subject: Re: SQL Syntax Question - Original Message - From: Karl-Heinz Schulz [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, August 03, 2004 9:18 PM Subject: SQL Syntax Question I tried to get an answer on the PHP mailing list and I was told

Re: SQL Syntax Question

2004-08-04 Thread Philippe Poelvoorde
Karl-Heinz Schulz wrote: Thank you for trying to help me. The output is wrong I get either Event 1 Event 2 Details 1 for event 1 Details 2 for event 1 Details 3 for event 1 that query is wrong : $eventdetail_query = mysql_query(select informations, titles, file_name from eventdetail, event where

RE: SQL Syntax Question

2004-08-04 Thread Karl-Heinz Schulz
] Sent: Wednesday, August 04, 2004 5:52 AM To: Karl-Heinz Schulz Cc: [EMAIL PROTECTED] Subject: Re: SQL Syntax Question Karl-Heinz Schulz wrote: Thank you for trying to help me. The output is wrong I get either Event 1 Event 2 Details 1 for event 1 Details 2 for event 1 Details 3

Re: SQL Syntax Question

2004-08-04 Thread Rhino
- Original Message - From: Karl-Heinz Schulz [EMAIL PROTECTED] To: 'Philippe Poelvoorde' [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, August 04, 2004 6:41 AM Subject: RE: SQL Syntax Question Philippe, I changed my to the following but the result is now (I deleted

SQL Syntax Question

2004-08-03 Thread Karl-Heinz Schulz
I tried to get an answer on the PHP mailing list and I was told that this list would be quicker to get me a solution. I have two tables Event and Eventdetails (structures dump can be found at the end of the message). I want to display all events and the related information from the eventdetails

Re: SQL Syntax Question

2004-08-03 Thread Rhino
- Original Message - From: Karl-Heinz Schulz [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, August 03, 2004 9:18 PM Subject: SQL Syntax Question I tried to get an answer on the PHP mailing list and I was told that this list would be quicker to get me a solution. I have two

multiple table delete syntax question

2004-07-25 Thread doug
I have a question about the multiple table delete syntax. First the documentation on the website is very clear. My question is why not how. The 'delete from using' is not ambiguous (to me). My question is about the form: delete t1 from t1,t2 where ... I would take this to mean remove matching

Re: multiple table delete syntax question

2004-07-25 Thread Michael Stassen
[EMAIL PROTECTED] wrote: I have a question about the multiple table delete syntax. First the documentation on the website is very clear. My question is why not how. The 'delete from using' is not ambiguous (to me). My question is about the form: delete t1 from t1,t2 where ... I would take this

Re: multiple table delete syntax question

2004-07-25 Thread doug
I have no problem understanding the syntax, or how to do what I want (at least after my first mistake). It is more about if this is a consistant grammar. For example, unix commands have the form verb src object, except for ln -s (IMO). From a lexical view, I do not think the two forms are

Create table syntax question

2004-06-16 Thread eifion herbert (IAH-C)
Hi, Probably a very basic question. I'm trying to a create a table in mySQL 4.0.15 thus: create table VACANCIES( VACREF char(6) NOT NULL PRIMARY KEY, TITLE varchar(60), LOC varchar(9), DESC text, STARTDATE date, GROUP varchar(25), CONSTRAINT fk_grp FOREIGN KEY (GROUP) REFERENCES GROUPS(GPNAME),

RE: Create table syntax question

2004-06-16 Thread Mike Johnson
From: eifion herbert (IAH-C) [mailto:[EMAIL PROTECTED] Hi, Probably a very basic question. I'm trying to a create a table in mySQL 4.0.15 thus: create table VACANCIES( VACREF char(6) NOT NULL PRIMARY KEY, TITLE varchar(60), LOC varchar(9), DESC text, STARTDATE date, GROUP

Re: Create table syntax question

2004-06-16 Thread Michael Stassen
eifion herbert (IAH-C) wrote: Hi, Probably a very basic question. I'm trying to a create a table in mySQL 4.0.15 thus: create table VACANCIES( VACREF char(6) NOT NULL PRIMARY KEY, TITLE varchar(60), LOC varchar(9), DESC text, STARTDATE date, GROUP varchar(25), CONSTRAINT fk_grp FOREIGN KEY (GROUP)

RE: Create table syntax question

2004-06-16 Thread eifion herbert (IAH-C)
. -Original Message- From: Michael Stassen [mailto:[EMAIL PROTECTED] Sent: 16 June 2004 16:43 To: eifion herbert (IAH-C) Cc: [EMAIL PROTECTED] Subject: Re: Create table syntax question eifion herbert (IAH-C) wrote: Hi, Probably a very basic question. I'm trying to a create

Re: Create table syntax question

2004-06-16 Thread Michael Stassen
] Subject: Re: Create table syntax question eifion herbert (IAH-C) wrote: Hi, Probably a very basic question. I'm trying to a create a table in mySQL 4.0.15 thus: create table VACANCIES( VACREF char(6) NOT NULL PRIMARY KEY, TITLE varchar(60), LOC varchar(9), DESC text, STARTDATE date, GROUP

If() syntax question

2004-04-21 Thread Don Dachner
Is it possible to do something like this? If(select * from xxx, if record found..update it, if record not found ..insert it) Thanks, Don

RE: If() syntax question

2004-04-21 Thread Mike Johnson
From: Don Dachner [mailto:[EMAIL PROTECTED] Is it possible to do something like this? If(select * from xxx, if record found..update it, if record not found ..insert it) Try the REPLACE INTO syntax: http://dev.mysql.com/doc/mysql/en/REPLACE.html -- Mike Johnson Web Developer Smarter

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

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

SQL Syntax question

2003-08-27 Thread Roberts, Mark (Tulsa)
These are tables that I did not design (and would not have in this fashion), but I have to make do with them Table 1 structure: id_num number, descr1 varchar(30), descr2 varchar(30), descr3 varchr(30) Table 2 structure id_name varchar(15), ext_descr varchar(30) Table 2 is a child of table 1

Re[2]: Syntax question

2003-06-17 Thread Martin's - Web Dept.
Hello Jeff, Monday, June 16, 2003, 1:13:27 PM, you wrote: JS On Mon, 16 Jun 2003 12:45:53 -0400, Martin's - Web Dept. wrote: I am quite willing to acknowledge that I'm new at this ... But I can't find the syntax error in this query: SELECT * FROM products WHERE MATCH (desc) AGAINST

Syntax question

2003-06-16 Thread Martin's - Web Dept.
I am quite willing to acknowledge that I'm new at this ... But I can't find the syntax error in this query: SELECT * FROM products WHERE MATCH (desc) AGAINST ('usb') desc is a field name, usb is the keyword I'm searching for. MYSQL version 4.0.12 Thanks for your help. Ryan -- MySQL

Re: Syntax question

2003-06-16 Thread Jim Winstead
On Mon, Jun 16, 2003 at 12:45:53PM -0400, Martin's - Web Dept. wrote: I am quite willing to acknowledge that I'm new at this ... But I can't find the syntax error in this query: SELECT * FROM products WHERE MATCH (desc) AGAINST ('usb') desc is a field name, usb is the keyword I'm

Re: Syntax question

2003-06-16 Thread Jeff Shapiro
On Mon, 16 Jun 2003 12:45:53 -0400, Martin's - Web Dept. wrote: I am quite willing to acknowledge that I'm new at this ... But I can't find the syntax error in this query: SELECT * FROM products WHERE MATCH (desc) AGAINST ('usb') desc is a field name, usb is the keyword I'm searching

Re: SQL syntax question

2002-05-14 Thread Victoria Reznichenko
Graham, Monday, May 13, 2002, 8:45:09 PM, you wrote: GN I have a directory of professional magicians, consisting of a MySQL table GN like GN this: GN +-++-+ GN | artist | area| magic | GN

SQL syntax question

2002-05-13 Thread Graham Nichols
Hi, I have a directory of professional magicians, consisting of a MySQL table like this: +-++-+ | artist | area| magic | +-++-+ | Joe Bloggs | AZ*IN*TX | childrens |

sql syntax question

2002-04-02 Thread Hathaway, Scott L
I have the following query: select *, max(event_date) as high, min(event_date) as low from schedule where event_date between '2002-03-01' and '2003-04-30' group by week_ending,meeting_id order by name, event_date, start_time If I order by event_date, start_time, name, I get the proper results.

syntax question

2002-03-25 Thread Hathaway, Scott L
Does anyone know what is wrong with my syntax? (the sql statement works in mssql server)? SELECT user.*, wbs.name FROM wbs INNER JOIN (user INNER JOIN user_wbs ON user.id = user_wbs.user_id) ON wbs.id = user_wbs.wbs_id Thanks, Scott

RE: syntax question

2002-03-25 Thread Tommy Claasens / QDC KZN
Message- From: Hathaway, Scott L [mailto:[EMAIL PROTECTED]] Sent: Mon, 25 Mar 2002 15:47 To: '[EMAIL PROTECTED]' Subject: syntax question Does anyone know what is wrong with my syntax? (the sql statement works in mssql server)? SELECT user.*, wbs.name FROM wbs INNER JOIN (user INNER JOIN

Syntax question.

2002-03-07 Thread Victoria Reznichenko
Erik, Thursday, March 07, 2002, 12:58:26 AM, you wrote: ES Trying to figure out how to convert Sybase ASA syntax to MySQL. Need to ES select alpha ranges as in: ES SELECT * ES FROM table ES WHERE name LIKE '[A-Z]%' ES but this doesn't work. You should use REGEXP instead LIKE. REGEXP has more

Syntax question.

2002-03-06 Thread Erik Schwartz
Hi, Trying to figure out how to convert Sybase ASA syntax to MySQL. Need to select alpha ranges as in: SELECT * FROM table WHERE name LIKE '[A-Z]%' but this doesn't work. Appreciate your help, Erik Schwartz Systems Engineer InfoUSA 818-428-1040 [EMAIL PROTECTED] --- Outgoing mail was

SQL syntax question

2001-12-18 Thread Steve Osborne
I would like to use an input form to add users to my database, however, if the name is already in use, I do not want to add a duplicate record. I also need this to be case insensitive (ie Santa Claus = santa Claus). I've tried the following code, but it doesn't seem to be working

Re: SQL syntax question

2001-12-18 Thread Paul DuBois
At 10:02 AM -0800 12/18/01, Steve Osborne wrote: I would like to use an input form to add users to my database, however, if the name is already in use, I do not want to add a duplicate record. I also need this to be case insensitive (ie Santa Claus = santa Claus). Make the (LastName,

Re: query syntax question

2001-11-28 Thread Benjamin Pflugmann
Hi. On Wed, Nov 28, 2001 at 02:26:45PM +0900, [EMAIL PROTECTED] wrote: i want to do this: SELECT matrix.matrixId FROM matrix, language WHERE (matrix.fromLanguageId = language.languageId AND language.isoLanguageId = 25) AND (matrix.toLanguageId = language.languageId AND

query syntax question

2001-11-27 Thread Patrick Bolduan
i want to do this: SELECT matrix.matrixId FROM matrix, language WHERE (matrix.fromLanguageId = language.languageId AND language.isoLanguageId = 25) AND (matrix.toLanguageId = language.languageId AND language.isoLanguageId = 27); but the grouping doesn't seem to be working. it this a MySQL

Re: MySQL JOIN syntax question

2001-11-21 Thread Ian Barwick
On Wednesday 21 November 2001 03:01, James O'Brien wrote: I have been trying to perform a join with several tables and I am having no joy. error messages would increase the understanding of exactly what joy you aren't having ;-) Can some one send me a query (just a select * is fine) for

MySQL JOIN syntax question

2001-11-20 Thread James O'Brien
I have been trying to perform a join with several tables and I am having no joy. Can some one send me a query (just a select * is fine) for these tables the ID's i'm using below aren't the real column names but they will do for the purpose of this email. select * from table1 left join table2 on

ALTER Syntax Question

2001-11-09 Thread Brad Harriger
Is it legal to change a field name to the same name as in the following? ALTER TABLE t1 CHANGE a a INTEGER; Thanks, Brad This e-mail and any files transmitted with it are confidential and are intended solely for the use of the individual or entity to whom they are addressed. This

Re: ALTER Syntax Question

2001-11-09 Thread John Barton
Sure is: http://www.mysql.com/doc/A/L/ALTER_TABLE.html John Barton [EMAIL PROTECTED] http://jbarton.technicalworks.net On Fri, 9 Nov 2001, Brad Harriger wrote: Is it legal to change a field name to the same name as in the following? ALTER TABLE t1 CHANGE a a INTEGER; Thanks, Brad

Syntax Question: deleting previous duplicate entries

2001-08-30 Thread Tom Churm
hi, i've got a table collecting info from html forms. problem is, certain wiseguys always make multiple entries. could someone clue me in to how i can select the Last entry where there is a duplicate for the User (type text, these are email addresses), and automatically delete any previous

Re: Syntax Question: deleting previous duplicate entries

2001-08-30 Thread Ed Carp
Tom Churm ([EMAIL PROTECTED]) writes: hi, i've got a table collecting info from html forms. problem is, certain wiseguys always make multiple entries. could someone clue me in to how i can select the Last entry where there is a duplicate for the User (type text, these are email

Re: Syntax question for a beginner..

2001-07-06 Thread Rolf Hopkins
that are in B but not in A. - Original Message - From: { randy } [EMAIL PROTECTED] To: MySQL [EMAIL PROTECTED] Sent: Friday, July 06, 2001 14:05 Subject: Re: Syntax question for a beginner.. Well, I think I got it figured out. I am using PHP, and thought I could lick it with just one

Re: Syntax question for a beginner..

2001-07-06 Thread { randy }
You are the man...thanks a bunch! that's what I needed. = r a n d y / sesser at mac.com From: Rolf Hopkins [EMAIL PROTECTED] Date: Fri, 6 Jul 2001 14:39:59 +0800 To: { randy } [EMAIL PROTECTED], MySQL [EMAIL PROTECTED] Subject: Re: Syntax question for a beginner

Syntax question for a beginner..

2001-07-05 Thread { randy }
Alright, I am about to pull my hair out. I have 2 tables. Each have a column 'email' that are unique. Some of the records in both tables are duplicates and I want to combine the two tables into one with out bringing in the duplicates. So... I have this statement: Mysql SELECT email FROM tableA

RE: Syntax question for a beginner..

2001-07-05 Thread Shania Qiu
I remember somewhere has mentioned that MySQL does not copy with nested SELECT query. Properly it is the reason. Shania Qiu -Original Message- From: { randy } [mailto:[EMAIL PROTECTED]] Sent: Friday, 6 July 2001 4:29 p.m. To: MySQL Subject: Syntax question for a beginner.. Alright

RE: Syntax question for a beginner..

2001-07-05 Thread Siomara Pantarotto
I had never seen WHERE NOT before. Does this exist in mysql siomara From: Shania Qiu [EMAIL PROTECTED] To: '{ randy }' [EMAIL PROTECTED] CC: [EMAIL PROTECTED] Subject: RE: Syntax question for a beginner.. Date: Fri, 6 Jul 2001 16:39:47 +1200 I remember somewhere has mentioned that MySQL

RE: Syntax question for a beginner..

2001-07-05 Thread Bomber Steel
. Black Holes The End of The Universe? John G. Taylor PG 11. Line 1 -Original Message- From: { randy } [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 05, 2001 10:29 PM To: MySQL Subject: Syntax question for a beginner.. Alright, I am about to pull my hair out. I have 2 tables. Each have

Re: Syntax question for a beginner..

2001-07-05 Thread Rolf Hopkins
tableA and tableB, without the duplicates. - Original Message - From: { randy } [EMAIL PROTECTED] To: MySQL [EMAIL PROTECTED] Sent: Friday, July 06, 2001 12:28 Subject: Syntax question for a beginner.. Alright, I am about to pull my hair out. I have 2 tables. Each have a column 'email

SQL Syntax question

2001-04-25 Thread dboothe
I have two table I need to join in a query. The second table needs to be join twice (I think) to the first. Details as follows (tables pared down)... Table games gameid hometeamid guestteamid Table team teamid sponsor I want a query to return game.gamid, team.sponsor (hometeam),

RE: SQL Syntax question

2001-04-25 Thread Don Read
On 26-Apr-01 [EMAIL PROTECTED] wrote: I have two table I need to join in a query. The second table needs to be join twice (I think) to the first. Details as follows (tables pared down)... Table games gameid hometeamid guestteamid Table team teamid sponsor I want a query to

Re: SQL Syntax question

2001-04-21 Thread Bob Hall
Hi there, I'm using mysql 3.22.27 and get error when trying to run this select statement: SELECT custmls.mlsnumber,custmls.streetnumber,custmls.streetdirect, FORMAT(custmls.currentprice,0),custmls.streetnam,custmls.streetaddtl, custmls.municname,custmls.state,custmls.zipcd,custmls.salesassoc,

SQL Syntax question

2001-04-20 Thread Patrick J. Militzer
Hi there, I'm using mysql 3.22.27 and get error when trying to run this select statement: SELECT custmls.mlsnumber,custmls.streetnumber,custmls.streetdirect, FORMAT(custmls.currentprice,0),custmls.streetnam,custmls.streetaddtl, custmls.municname,custmls.state,custmls.zipcd,custmls.salesassoc,