>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
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,
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
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 wou
> >
> > 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 welcom
>
> - 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 quest
- 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,
>
> 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 achi
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
an earlier version.
> 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]
&g
- 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.d
- 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.d
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
Sent: 14 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.chai
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 unsubscri
- 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,
>
&g
Event 2
Details 1 for event 2
Details 2 for event 2
Details 3 for event 2
Is this even possible?
TIA
-Original Message-
From: Philippe Poelvoorde [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 04, 2004 5:52 AM
To: Karl-Heinz Schulz
Cc: [EMAIL PROTECTED]
Subject: Re: SQL Syntax
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
-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 P
- 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
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
eventdetai
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 " ", except for "ln -s"
(IMO).
>From a lexical view, I do not think the two forms are parallel. My que
[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 t
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
PROTECTED]
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,
STARTD
enforce RI.
> -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:
>
>
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)
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,
> GR
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),
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
Sma
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
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
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
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) A
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 sear
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 s
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 Genera
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> +-++--
Hi,
I have a directory of professional magicians, consisting of a MySQL table
like
this:
+-++-+
| artist | area| magic |
+-++-+
| Joe Bloggs | AZ*IN*TX | childrens |
+-
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.
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
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
---
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
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 sniffed
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, FirstNa
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
$chknamero
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 language.isoLang
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 limitat
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 th
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
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
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 communica
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 add
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 entr
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&
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,
ow you can't do nested selects :\
- randy
=
r a n d y / sesser at mac.com
> From: "Rolf Hopkins" <[EMAIL PROTECTED]>
> Date: Fri, 6 Jul 2001 13:57:27 +0800
> To: "{ randy }" <[EMAIL PROTECTED]>, "MySQL" <[EMAIL PROTECTED]
both 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.
.
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
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
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
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
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 wan
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), team.spons
>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.sales
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,
ip
67 matches
Mail list logo