Re: Help with SELECT and possible JOIN

2009-01-19 Thread Duane Hill
On Mon, 19 Jan 2009, Duane Hill wrote: I have two tables defined: CREATE TABLE `tga_body` ( `body_id` int(10) unsigned NOT NULL auto_increment, `blob_pos` mediumint(8) unsigned NOT NULL, `file_id` int(10) unsigned NOT NULL, `blob_id` int(10) unsigned NOT NULL, PRIMAR

Re: help with select

2007-12-05 Thread Andy Wallace
You might try this: SELECT I.iid, CONCAT(ECOMP.last, ', ', ECOMP.first) AS 'Completed By', CONCAT(ESUB.last, ', ', ESUB.first) AS 'Submitted By', FROM idea I JOIN employee ECOMP ON I.completed_by = ECOMP.eid JOIN employee ESUB ON I.submitted_by = ESUB.eid andy Hiep Nguyen wrote:

Re: help with select

2007-12-05 Thread Martin Gainty
mysql> select idea.iid, concat(employee.first," ",employee.last),(SELECT concat( employee.first," ",employee.last) FROM EMPLOYEE where employee.eid=idea.submitted_by) from ide a,employee where idea.iid=1 and idea.completed_by=employee.eid; M-- - Original Message - From: "Hiep Nguyen" <[EMA

Re: help with SELECT BETWEEN

2006-04-25 Thread Shawn Green
--- Chris <[EMAIL PROTECTED]> wrote: > I want to create a SELECT statement using BETWEEN like: > SELECT * FROM mytable WHERE myfield BETWEEN value_1 AND value_2. The > field > I'm applying my BETWEEN clause is a varchar. > > Now, if value_1 and value_2 are numbers the select statement works a

Re: help with SELECT BETWEEN

2006-04-25 Thread Chris White
On Tuesday 25 April 2006 09:33 am, Chris wrote: > I want to create a SELECT statement using BETWEEN like: > SELECT * FROM mytable WHERE myfield BETWEEN value_1 AND value_2. The field > I'm applying my BETWEEN clause is a varchar. > If the appropriate format (enclosing or not enclosing with apostr

Re: Help with SELECT statement for date range

2003-08-19 Thread shaag
Hi, try this: SELECT * FROM your_table WHERE StartDate > NOW() AND EndDate < NOW() > Hello, > > I am having a problem when doing a SELECT. Here is the > scenerio: > > I have a table that has an event StartDate and > EndDate, based on the current Date "NOW()" I need to > know which records are

RE: Help with SELECT statement for date range

2003-08-19 Thread Ralph Guzman
SELECT * FROM table_name WHERE EndDate < now(); Is this what you need? -Original Message- From: Rob Sirota [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 19, 2003 4:12 AM To: [EMAIL PROTECTED] Subject: Help with SELECT statement for date range Hello, I am having a problem when doing a

Re: Help with SELECT statement for date range

2003-08-19 Thread Antony Dovgal
On Tue, 19 Aug 2003 04:11:32 -0700 (PDT) Rob Sirota <[EMAIL PROTECTED]> wrote: > Hello, > > I am having a problem when doing a SELECT. Here is the > scenerio: > > I have a table that has an event StartDate and > EndDate, based on the current Date "NOW()" I need to > know which records are curren

RE: Help with SELECT, JOIN and WHERE query

2003-01-29 Thread heiko mundle
: Re: Help with SELECT, JOIN and WHERE query From: Stefan Hinz, iConnect \(Berlin\) Date: Wed, 29 Jan 2003 00:02:22 +0100 Victor, good shot! I thought of this one in the first place: SELECT u.user_id FROM user_profile u LEFT JOIN team_member t ON u.user_id = t.user_id WHERE t.team_id <>

Re: Help with SELECT, JOIN and WHERE query

2003-01-28 Thread Stefan Hinz, iConnect \(Berlin\)
<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, January 28, 2003 5:30 PM Subject: RE: Help with SELECT, JOIN and WHERE query SELECT u.user_id FROM user_profile u LEFT JOIN team_member t ON u.user_id = t.user_id WHERE t.team_id <> 2 -Original Message- From: heiko

Re: Help with SELECT, JOIN and WHERE query

2003-01-28 Thread gerald_clark
WHERE team_member.user_id IS NULL William R. Mussatto wrote: Hi, I got a difficult problem with a SELECT query: In my application there are two tables, one for all users (user_profile) one for a user-in-team relation. I want to know, which user is still not in a speciffic team. Users can be

Re: Help with SELECT, JOIN and WHERE query

2003-01-28 Thread William R. Mussatto
> Hi, > > I got a difficult problem with a SELECT query: > > In my application there are two tables, one for all users (user_profile) > one for a user-in-team relation. > > I want to know, which user is still not in a speciffic team. Users can > be in more than one team, but we don't care about tha

RE: Help with SELECT, JOIN and WHERE query

2003-01-28 Thread Victor Pendleton
SELECT u.user_id FROM user_profile u LEFT JOIN team_member t ON u.user_id = t.user_id WHERE t.team_id <> 2 -Original Message- From: heiko mundle [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 28, 2003 8:08 AM To: [EMAIL PROTECTED] Subject: Help with SELECT, JOIN and WHERE query Hi, I

Re: Help with SELECT, JOIN and WHERE query

2003-01-28 Thread Dobromir Velev
Hi, a query like this should do the job select user_profile.user_id from user_profile left join team_member on (team_member.user_id=user_profile.user.id and team_member.team_id=2) where team_member.user_id is NULL; Dobromir Velev [EMAIL PROTECTED] www.websitepulse.com - Original Message ---

Re: help with select

2001-06-10 Thread Rolf Hopkins
I presume that is just an example as people's names don't make very good primary keys. Something like SELECT h2.* FROM hotel h1, hotel h2 WHERE h1.name = 'BILL' AND h1.room = h2.room I haven't tried it so you'll have to play around with it a bit. - Original Message - From: "Jaime Teng"

Re: help with select

2001-06-08 Thread Augusto Cesar Castoldi
Let me see if I understood your question: "select * from tablename a, tablename2 b where a.account='BILL' and a.account=b.account" It's tow tables or just one table? because if it's just one table just do "select * from tablename where account='BILL'" see you, Augusto On Sat, 9 Jun 2001, Jai

Re: Help with SELECT statement.

2001-03-02 Thread btjones
SELECT request.id, request.date, request.type, request.status, faculty.f_name, faculty.l_name, action.id, faculty.id FROM request INNER JOIN faculty ON request.requested_by=faculty.id LEFT JOIN request ON action.request_id=request.id; Chris Toth <[EMAIL PROTECTED]> wrote: I'm trying to form