how to optimize this simple query with join?

2007-03-03 Thread MAS!
I have to tables (on mysql 5.0.22): Table: shelf CREATE TABLE `shelf` ( `isbn` varchar(10) NOT NULL default '', `product_type` char(1) default NULL, `title` varchar(150) NOT NULL default '', (...) PRIMARY KEY (`isbn`), KEY `publ_date` (`publ_date`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1

Re: mysql exclusion query with JOIN (request for help)

2005-03-23 Thread Jigal van Hemert
Hi Daniel, > Jigal, thank you very much. However, this does not resolve my issue. > > even when querying: > SELECT * FROM ae_articles AS art LEFT JOIN ae_articlesections AS sec ON > art.ID=sec.articleID WHERE art.title LIKE '%bush%' AND sec.sectionID IN (1,2) > AND sec.sectionID NOT IN (3) What *

Re: mysql exclusion query with JOIN (request for help)

2005-03-23 Thread Jigal van Hemert
yntax. You can find info on joins at: http://dev.mysql.com/doc/mysql/en/join.html Regards, Jigal. - Original Message - From: "Dan Duris" <[EMAIL PROTECTED]> To: Sent: Wednesday, March 23, 2005 10:35 AM Subject: mysql exclusion query with JOIN (request for help) > Anyon

mysql exclusion query with JOIN (request for help)

2005-03-23 Thread Dan Duris
Anyone knows who to make exclusion query when table is referenced via JOIN: SELECT * FROM ae_articles AS art LEFT JOIN ae_articlesections AS sec ON art.ID=sec.articleID LEFT JOIN ae_articlesections AS sec2 ON art.ID=sec2.articleID LEFT JOIN ae_articlesections AS sec3 ON art.ID=sec3.articleID WHERE

re: Update query with Join

2003-03-10 Thread Egor Egorov
On Monday 10 March 2003 10:40, Hu Qinan wrote: > Which records in tbl1 are to be updated are determined by an INNER JOIN > with tbl2. I have tried the following: > > UPDATE tbl1 INNER JOIN tbl2 ON tbl1.id = tbl2.id > SET tbl1.col1 = 0; > > UPDATE tbl1, tbl2 > SET tbl1.col1 = 0 > WHERE tbl1.id = tb

Update query with Join

2003-03-10 Thread Hu Qinan
I use MySQL 3.23.

Update query with Join

2003-03-10 Thread Hu Qinan
Dear all, Which records in tbl1 are to be updated are determined by an INNER JOIN with tbl2. I have tried the following: UPDATE tbl1 INNER JOIN tbl2 ON tbl1.id = tbl2.id SET tbl1.col1 = 0; UPDATE tbl1, tbl2 SET tbl1.col1 = 0 WHERE tbl1.id = tbl2.id; UPDATE tbl1 SET tbl1.col1 = 0 INNER JOIN tb

Re: SQL Update Query with join

2002-05-30 Thread Victoria Reznichenko
Joe, Wednesday, May 29, 2002, 1:28:42 AM, you wrote: JC> We have 3 tables: Users, List, and UsersList (a join table). How can I JC> write a correct update statement to update the STATE field in the Users JC> table for a certain List? For example, is the following UPDATE correct: JC> Update Us

Re: Query with JOIN

2001-04-17 Thread btjones
SELECT a.id_user,a.name, a.surname from user a LEFT JOIN workgroup b ON a.id_user=b.id_user WHERE b.id_user IS NULL; Daniele Medri <[EMAIL PROTECTED]> wrote: Hi All, this is my problem: 2 tables.. 1) workgroup(id_survey,id_user,...) ..where i put reference of user with multiple istances. 2

Query with JOIN

2001-04-17 Thread Daniele Medri
Hi All, this is my problem: 2 tables.. 1) workgroup(id_survey,id_user,...) ..where i put reference of user with multiple istances. 2) user(id_user,name,surname,...) ..where there're all users i need to select with a single query what user aren't in workgroup. I've tried some query+join but i d