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
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 *
: 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
, 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
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
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) =
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
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 |
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
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
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
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
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
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
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
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
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
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
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
-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
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
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
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
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
(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
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
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
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
: 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
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
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
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
* =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
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
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
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
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
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
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 =
: 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
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)
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
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
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.
44 matches
Mail list logo