Where exists query syntax error?

2005-09-02 Thread Barbara Deaton
I need help re-writing a query. When accessing DB2 I can execute the below: delete from DM_KOHLS.clr_plan_price_change_metrics A where A.start_dt= Date( '05/15/2005' ) and

Re: Where exists query syntax error?

2005-09-02 Thread SGreen
Barbara Deaton [EMAIL PROTECTED] wrote on 09/02/2005 11:33:19 AM: I need help re-writing a query. When accessing DB2 I can execute the below: delete from DM_KOHLS.clr_plan_price_change_metrics A where A.start_dt= Date( '05/15/2005' ) and exists ( select *

RE: Where exists query syntax error?

2005-09-02 Thread Barbara Deaton
: Where exists query syntax error? Barbara Deaton [EMAIL PROTECTED] wrote on 09/02/2005 11:33:19 AM: I need help re-writing a query. When accessing DB2 I can execute the below: delete from DM_KOHLS.clr_plan_price_change_metrics A where A.start_dt= Date

RE: Where exists query syntax error?

2005-09-02 Thread SGreen
, 2005 11:48 AM To: Barbara Deaton Cc: mysql@lists.mysql.com Subject: Re: Where exists query syntax error? Barbara Deaton [EMAIL PROTECTED] wrote on 09/02/2005 11:33:19 AM: I need help re-writing a query. When accessing DB2 I can execute the below: delete from

query syntax in new mysql query browser

2004-12-09 Thread Eben
I have a sql script that issues a bunch of truncate statements to purge a database in development. The script looks like: truncate table table_1; truncate table tabel_2; truncate table table_3; and so on... I can load this script as a single query in the old mysql_front (version 2.2) GUI and

Correct date query syntax

2004-08-26 Thread Yong Wang
Hi, All: I have a database which contains date attribute in string format (like 2004-08-12). I want to genearte a report based on period time. I use the syntax: date1 ='2004-08-12' date2='2004-08-18' SELECT * FROM account WHERE (TO_DAYS(date) = TODAYS(date1)) and (TO_DAYS(date) =

Re: Correct date query syntax

2004-08-26 Thread Jochem van Dieten
On Thu, 26 Aug 2004 11:31:46 -0500, Yong Wang [EMAIL PROTECTED] wrote: I have a database which contains date attribute in string format (like 2004-08-12). I want to genearte a report based on period time. I use the syntax: date1 ='2004-08-12' date2='2004-08-18' SELECT * FROM account

Re: Correct date query syntax

2004-08-26 Thread SGreen
I believe you are not letting MySQL do enough work for you. The date format is perfect, even as a string, to perform the comparison you are trying to perform. SELECT @currTime := NOW(); +-+ | @currTime := NOW() | +-+ | 2004-08-26 12:48:16 |

query syntax help

2004-01-20 Thread Mike Blezien
WHERE aw.siteid = 1000 AND ai.affilid = as.affilid AND aw.affilid = ai.affilid what is wrong with this query syntax ?? the syntax error is suppose to be in this area: `affiliate_website aw WHERE aw.siteid = 1000` MySQL version 4.0.15 w/InnoDB tables TIA, -- MikemickaloBlezien

Re: query syntax help

2004-01-20 Thread Fred van Engen
affiliate_info ai,affiliate_signup as,affiliate_website aw AS is a reserved word. WHERE aw.siteid = 1000 AND ai.affilid = as.affilid AND aw.affilid = ai.affilid what is wrong with this query syntax ?? the syntax error is suppose to be in this area: `affiliate_website aw WHERE aw.siteid = 1000

Re: query syntax help

2004-01-20 Thread Jochem van Dieten
Mike Blezien said: I've been looking at this SQL query a dozen times or more, but keep getting a syntax error message, Query: SELECT ai.affilid,ai.create_date,CONCAT(ai.fname,' ',ai.lname) AS name,aw.siteid,ai.email,as.username,as.status FROM affiliate_info ai,affiliate_signup

Re: query syntax help

2004-01-20 Thread Mike Blezien
AND ai.affilid = as.affilid AND aw.affilid = ai.affilid what is wrong with this query syntax ?? the syntax error is suppose to be in this area: `affiliate_website aw WHERE aw.siteid = 1000` A bit before that. Regards, Fred. -- MySQL General Mailing List For list archives: http://lists.mysql.com

Re: Query syntax.

2003-12-23 Thread Data Boy
a.User_Account = b.Device_Account AND b.Device_Name LIKE 'HP%' - Original Message - From: Michael Stassen [EMAIL PROTECTED] To: Will Lowe [EMAIL PROTECTED] Cc: Data Boy [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, December 22, 2003 1:25 PM Subject: Re: Query syntax. Will Lowe

Re: Query syntax.

2003-12-23 Thread Michael Stassen
Data Boy wrote: Will and Michael, Thanks very much for the the replies. This works well. Is it possible to use this syntax and search for cases where they have two different kinds of equipment? Say an Ultra 5 and a HP Plotter? TIA, DB SELECT User_Account FROM Users AS a, Device_Name from

[Fwd: Re: Query syntax.]

2003-12-23 Thread Michael Stassen
The mysql list sent this back to me, so I'm resending. My apologies to anyone who ends up getting it twice. Data Boy wrote: Will and Michael, Thanks very much for the the replies. This works well. Is it possible to use this syntax and search for cases where they have two different kinds of

Query syntax.

2003-12-22 Thread Data Boy
Hi, I'm having problems with the syntax of a select statement. I have two tables linked together by account number. The first table (Users) looks similar to this |User_Account | User_Name | User_Address |X10010100110 | Michael Smith | 1000 North Main St |X10010100240 | David

Re: Query syntax.

2003-12-22 Thread Will Lowe
Select User_Account from Users as a, Devices as b WHERE a.User_Account = (Select DISTINCT(b.Device_Account) from b.Devices WHERE b.Device_Name LIKE 'HP%' ) I'm running 3.23.49 which I know is not the most current..it was installed 3.x does not support

Re: Query syntax.

2003-12-22 Thread Michael Stassen
Will Lowe wrote: Select User_Account from Users as a, Devices as b WHERE a.User_Account = (Select DISTINCT(b.Device_Account) from b.Devices WHERE b.Device_Name LIKE 'HP%' ) I'm running 3.23.49 which I know is not the most current..it was installed 3.x does not

select query syntax help

2003-10-30 Thread Dan Lamb
Hello All, I have two table the look like this (greatly simplified): ResourceTable - int ResourceID var ResourceName ResourceLinkTable - int ResourceLinkID int ResourceID var Text I need to find all rows in ResourceTable for which there is NO entry in

RE: select query syntax help [ANSWER]

2003-10-30 Thread Fortuno, Adam
-Original Message- From: Dan Lamb [mailto:[EMAIL PROTECTED] Sent: Thursday, October 30, 2003 9:39 AM To: [EMAIL PROTECTED] Subject: select query syntax help Hello All, I have two table the look like this (greatly simplified): ResourceTable - int ResourceID var ResourceName

Re: select query syntax help

2003-10-30 Thread Thomas Spahni
Dan, SELECT ResourceTable.* FROM ResourceTable LEFT JOIN ResourceLinkTable ON ResourceTable.ResourceID = ResourceLinkTable.ResourceID WHERE ResourceLinkTable.ResourceID IS NULL; Regards, Thomas On Thu, 30 Oct 2003, Dan Lamb wrote: Hello All, I have two table the look like this

SQL Query Syntax Error

2003-07-08 Thread Trevor Sather
Hello The following query used to work when I was using an Access database, but now that I've moved to MySQL I get a syntax error when I try and run it: SELECT *, (SELECT COUNT (*) FROM Links WHERE Links.CAT_ID = Categories.CAT_ID AND LINK_APPROVED = 'Yes') AS LINK_COUNT FROM Categories ORDER

RE: SQL Query Syntax Error

2003-07-08 Thread Tab Alleman
Trevor Sather wrote: Hello The following query used to work when I was using an Access database, but now that I've moved to MySQL I get a syntax error when I try and run it: SELECT *, (SELECT COUNT (*) FROM Links WHERE Links.CAT_ID = Categories.CAT_ID AND LINK_APPROVED = 'Yes') AS

Query syntax help?

2003-02-22 Thread Scott Brown
OK, I am having a bit of trouble designing a MySQL query that returns what I want. Here is the query as I have it thus far: SELECT DISTINCT regformfields.name AS thename, regformfields.label AS thelabel, regfields.name AS fieldsname FROM

Re: Query syntax help?

2003-02-22 Thread Tore Bostrup
(another column) in this case, unless you include it (F.saveorder) in the SELECT and GROUP BY list. HTH, Tore. - Original Message - From: Scott Brown [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, February 22, 2003 1:57 PM Subject: Query syntax help? OK, I am having a bit

Query syntax help

2002-03-21 Thread rory oconnor
I'm trying to figure out a query that will tell me the total number of people in our house email file that physically opted out in the last week. I'm a bit of a mysql newbie as you can tell... This is the general concept, though it doesn't seem to work: select count(id) from contact # my

RE: Query syntax help

2002-03-21 Thread Rick Emery
AND date = 2002-03-17; -Original Message- From: rory oconnor [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 21, 2002 10:49 AM To: mysql list (choose midget) Subject: Query syntax help I'm trying to figure out a query that will tell me the total number of people in our house email

RE: Query syntax help

2002-03-21 Thread Roger Baklund
I'm trying to figure out a query that will tell me the total number of people in our house email file that physically opted out in the last week. I'm a bit of a mysql newbie as you can tell... This is the general concept, though it doesn't seem to work: select count(id) from contact

RE: Query syntax help

2002-03-21 Thread Daren Cotter
: Query syntax help I'm trying to figure out a query that will tell me the total number of people in our house email file that physically opted out in the last week. I'm a bit of a mysql newbie as you can tell... This is the general concept, though it doesn't seem to work: select count(id) from

Query syntax: multiple foreign keys

2002-01-12 Thread =James Birkholz=
I'm new to the list, to mysql and to dynamic website programming. I'm not new to programming, had my nose in Access97 for the last few years, off and on. So I'm used to being coddled with sql and can't find a syntax that works for this situation: (I'm using phpMyAdmin to work with the database

Re: Query syntax: multiple foreign keys

2002-01-12 Thread DL Neil
James, I'm new to the list, to mysql and to dynamic website programming. I'm not new to programming, had my nose in Access97 for the last few years, off and on. So I'm used to being coddled with sql and can't find a syntax that works for this situation: (I'm using phpMyAdmin to work with

RE: Query syntax: multiple foreign keys

2002-01-12 Thread =James Birkholz=
In a message dated 1/12/02 10:48:45 AM Central Standard Time, [EMAIL PROTECTED] writes: ---snip--- SELECT A.Name, B.Name, P.ID FROM Persons P LEFT JOIN QualityA A USING(A_ID) LEFT JOIN QualityB B USING(B_ID) WHERE P.ID = thatGuy; ---snip--- That doesn't work, get an error as it

RE: Query syntax: multiple foreign keys

2002-01-12 Thread Roger Baklund
* =James Birkholz= In a message dated 1/12/02 10:48:45 AM Central Standard Time, [EMAIL PROTECTED] writes: ---snip--- SELECT A.Name, B.Name, P.ID FROM Persons P LEFT JOIN QualityA A USING(A_ID) LEFT JOIN QualityB B USING(B_ID) WHERE P.ID = thatGuy; ---snip--- That doesn't

RE: Query syntax: multiple foreign keys

2002-01-12 Thread Roger Baklund
I'm going to send direct from the programming computer, using a different e-mail address. Ok, I reply to the list, but CC to you. Think I found your problem... I did find that I had one invalid foreign key value in table A, but my problem remains... I tried this: Database PosenL running

Re: Query syntax: multiple foreign keys

2002-01-12 Thread =James Birkholz=
I'm going re-post this query. Roger Backlund had been attempting to help me but I've either stumped him or he's busy having a life :) Besides, my first posting had several problems, since I was working from memory. Finally, in the process of preparing this query, I found a small change that

RE: Query syntax: multiple foreign keys

2002-01-12 Thread =James Birkholz=
Wow, our posts crossed in the mail and you suggested the same approach that I discovered independently! (Great minds think alike, right?) I'm working remotely, the server is many states away, and I don't have a local developement environment. I'm modifying the actual working site, though I try to

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

Servlet SELECT Query syntax error

2001-05-30 Thread Lucy
Hi Error message You have error in your SQL syntax ... Using Apache Tomcat - MySQL in Win 2000. Scenario: Servlet collects form data value, sends query to MySQL, returns search. The problem is getting the value of the inputted parameter named, title_name. Problem coding: rs =

RE: Servlet SELECT Query syntax error

2001-05-30 Thread David Lidström
: Servlet SELECT Query syntax error Hi Error message You have error in your SQL syntax ... Using Apache Tomcat - MySQL in Win 2000. Scenario: Servlet collects form data value, sends query to MySQL, returns search. The problem is getting the value of the inputted parameter named, title_name. Problem

select query syntax

2001-04-28 Thread Igor V Yermakov
i have 400 rows in my mysql database table and i wont get each N row from table (say each sixth row)??? please help me??? - Before posting, please check: http://www.mysql.com/manual.php (the manual)

Re: select query syntax

2001-04-28 Thread Rene Tegel
supposed you numbered all rows in the table incrementally in field nid: select mydata from mytable where mod(nid, N)=offset; fill in N and offset (0..n-1) On Sat, 28 Apr 2001 14:26:46 +0400 Igor V Yermakov [EMAIL PROTECTED] wrote: i have 400 rows in my mysql database table and i wont get

Help with Query Syntax?

2001-01-29 Thread Lee Jenkins
Hi all. I'm having a little trouble with this query. **Table 1 (Orders) ** OrderID SmallInt OrderStatus VarChar(20) CustomerPhone VarChar(10) SalesRepIDSmallInt(11) **Table 2 (Customers)** CustomerFirst VarChar(20) CustomerLast

Re: Help with Query Syntax?

2001-01-29 Thread Roger Ramirez
the o.OrderID but I usually like selecting the ID from the main table being queried. - Original Message - From: "Lee Jenkins" [EMAIL PROTECTED] To: "MySQL Mail list" [EMAIL PROTECTED] Sent: Monday, January 29, 2001 10:18 PM Subject: Help with Query Syntax? Hi all.