madderla sreedhar [EMAIL PROTECTED] wrote on 05/02/2005 03:10:07 AM:
Can u please execute the following procedure in MySql
and tell me where I had gone wrong because on my
system the same code is giving error near line
:= 'TRUE'
CREATE PROCEDURE cart_items_validate
(IN mcustid INT
Madderla,
1. Var assignments need SET, ie SET mvariable = ...
2. Missing semicolon after 'TRUE'
PB
-
madderla sreedhar wrote:
Can u please execute the following procedure in MySql
and tell me where I had gone wrong because on my
system the same code is giving error near line
:= 'TRUE'
Shawn, Madderla,
Don't you need to DECLARE the variable "mvalidate" before you can
use it?
It's declared as OUT mvalidate varchar(10).
PB
-
[EMAIL PROTECTED] wrote:
madderla sreedhar [EMAIL PROTECTED] wrote on 05/02/2005 03:10:07 AM:
Can u please execute the following
Original Message
Subject: Re: Need help w/ re-starting Replication
From: Atle Veka [EMAIL PROTECTED]
Date: Fri, April 29, 2005 5:20 pm
To: [EMAIL PROTECTED]
Cc: mysql@lists.mysql.com
On Fri, 29 Apr 2005 [EMAIL PROTECTED] wrote:
I set up replication and it was working fine
Your questions (this one and the other one that you posted at the same time)
are not very clear so I am really not sure what you want.
However, if you are asking about creating a package for your Java source
code, this has nothing to do with MySQL: there is no special technique for
creating a
Hi Sreedhar, all!
madderla sreedhar wrote:
--- Joerg Bruehe [EMAIL PROTECTED] wrote:
Hi!
[[...]]
The manual states clearly:
Stored procedures and functions are a new feature
in MySQL version 5.0.
(At the proper place: 19 Stored Procedures and
Functions)
Sreedhar, if you have a follow-up
On Fri, 29 Apr 2005 [EMAIL PROTECTED] wrote:
I set up replication and it was working fine but I re-created my master
database (droped and created empty tables) and now my replication
doesn't work. I checked the status of master and slave and they think
they are in sync but when I add a new
Hi!
madderla sreedhar wrote:
Hi,
Iam looking to migrate an Oracle database to MySQL and
trying to write a simple stored procedure in MySQL 4.1
The manual states clearly:
Stored procedures and functions are a new feature in MySQL version 5.0.
(At the proper place: 19 Stored Procedures and
Hello.
Have you ran mysql_init_db on a new data directory?
store the tables that store grants and such, but how to we get those
created for the new instance. We've been all over the MySQL.com docs
It is unclear for me. You may specify the datadir for every new
instance. See:
I think the second can be better (more different values). But it
contains almost the same data than the table.
Try :
explain Select machine,count(*) from syslog WHERE date1 (NOW()
- INTERVAL 24
hour) AND message LIKE 'sshd%' GROUP BY machine;
But an index with(date1, message, machine)
many thanks
that was exactly what I needed.
Building upon the initial question:
Is there a way to get Match statements to do partial word
searches...like %LIKE% ?
For example, if the below Match Against query with 'chris' does not
bring up anything...
AND MATCH (
media.name, media.product
Graham Anderson [EMAIL PROTECTED] wrote on 04/14/2005 11:51:58 AM:
many thanks
that was exactly what I needed.
Building upon the initial question:
Is there a way to get Match statements to do partial word
searches...like %LIKE% ?
For example, if the below Match Against query with
Graham Anderson [EMAIL PROTECTED] wrote on 04/13/2005 01:46:35 PM:
Hi
I am trying to set up my Match statements to filter the result of the
main query [which works]
If 'chris' does not exist in the first MATCH statement [AND MATCH
(media.name, media.product)], then the results get a bit
Drew Reid wrote:
Hello I need to download a version of mySql v4, but I don't know which one
to download.
As the server is mySql compatible they must already be running mySql on the
system.
Uh-oh -- not the perennial faceless they, again!?
Shouldn't you ask them what version is on the server so
Dinesh,
A stored func returns a scalar. To return multiple values, use an sproc
declaring the INOUT variables you need, pick up their values in
the calling code after the sproc has executed.
Peter Brawley
http://www.artfulsoftware.com
-
Anchan, Dinesh wrote:
Hi,
I am
function;
Thank you for your help
Dinesh
From: Peter Brawley [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 07, 2005 12:24 PM
To: Anchan, Dinesh
Cc: mysql@lists.mysql.com
Subject: Re: Need help in Stored procedures and functions
Dinesh,
A stored func returns
Cc: mysql@lists.mysql.com
Subject: Re: Need help in Stored procedures and functions
Dinesh,
A stored func returns a scalar. To return multiple values, use an sproc
declaring the INOUT variables you need, pick up their values in the
calling code after the sproc has executed.
Peter
PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 07, 2005 4:03 PM
To: Anchan, Dinesh
Cc: mysql@lists.mysql.com; [EMAIL PROTECTED]
Subject: RE: Need help in Stored procedures and functions
Anchan, Dinesh [EMAIL PROTECTED] wrote on 04/07/2005
03:44:07 PM:
Peter,
Thank you for your reply
Cc: mysql@lists.mysql.com
Subject: Re: Need help in Stored procedures and functions
Dinesh,
A stored func returns a scalar. To return multiple values, use an sproc
declaring the INOUT variables you need, pick up their values in the
calling code after the sproc has executed.
Peter Brawley
http
---
From: Rhino
Subject: Re: Need help coverting MDB SQL
Sent: Mar 26 2005 10:26:58
- Original Message -
From: Ricky Groleau
To:
Sent: Saturday, March 26, 2005 10:13 AM
Subject: Need help coverting MDB SQL
Hello,
I have tried and i have failed. I am
Dinesh,
Do you have something like
DELIMITER |
before the CREATE PROCEDURE call, and
|
DELIMITER ;
after it?
Peter Brawley
http://www.artfulsoftware.com
-
Anchan, Dinesh wrote:
Hi,
I am looking to migrate an Informix database to MySQL and trying to
write a simple stored
but i will get there.
Thanks for your help.
Dinesh
From: Peter Brawley [mailto:[EMAIL PROTECTED]
Sent: Friday, April 01, 2005 12:03 PM
To: Anchan, Dinesh
Cc: mysql@lists.mysql.com
Subject: Re: Need help with Stored Procedures iin MySQL 5.0.3-beta
Dinesh,
Do
]]
Sent: Friday, April 01, 2005 12:03 PM
To: Anchan, Dinesh
Cc: mysql@lists.mysql.com
Subject: Re: Need help with Stored Procedures iin MySQL
5.0.3-beta
Dinesh,
Do you have something like
DELIMITER |
before the CREATE PROCEDURE call, and
|
DELIMITER ;
after it?
Peter Brawley
http
it to my sever, but I am lost..is
it the IP or web address? Where is SQL hidden on a linux/apache server?
---Original Message---
From: Rhino
Subject: Re: Need help coverting MDB SQL
Sent: Mar 26 2005 10:26:58
- Original Message -
From: Ricky Groleau
To:
Sent: Saturday, March 26, 2005
- Original Message -
From: David Blomstrom [EMAIL PROTECTED]
To: mysql@lists.mysql.com
Sent: Tuesday, March 29, 2005 11:29 PM
Subject: Need Help with 813-MDB File
I acquired a CD-ROM that lists many thousands of
animal species. The main file is a 813-MB MDB file.
I'm not sure if
Is there a description of tables anywhere on CD-ROM for Access database.
Mikhail
-Original Message-
From: Rhino [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 30, 2005 9:10 AM
To: David Blomstrom; mysql@lists.mysql.com
Subject: Re: Need Help with 813-MDB File
- Original Message
.
Mikhail
-Original Message-
From: Rhino [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 30, 2005 9:10 AM
To: David Blomstrom; mysql@lists.mysql.com
Subject: Re: Need Help with 813-MDB File
- Original Message -
From: David Blomstrom [EMAIL PROTECTED]
To: mysql
PROTECTED]
Sent: 30 March 2005 06:23
To: mysql@lists.mysql.com
Subject: RE: Need Help with 813-MDB File
Thanks for both your tips. I discovered by chance that
Navicat (which I have) will do the conversion - very
easily. Whether or not it will be a success is hard to
say; it's loaded nearly 3
David Blomstrom wrote:
I acquired a CD-ROM that lists many thousands of
animal species. The main file is a 813-MB MDB file.
I'm not sure if it's a spreadsheet or database, but
it's apparently designed to work with Microsoft
Access, which I THINK is a spreadsheet. (I don't have
it.)
I have just
DB Tools software will convert the file for you. You can download it at
http://dbtools.com.br/EN/index.php. All you have to do is download and
install the FreeWare version and then use the TOOLS DAO Import Wizard.
J.R.
-Original Message-
From: David Blomstrom [mailto:[EMAIL PROTECTED]
Thanks for both your tips. I discovered by chance that
Navicat (which I have) will do the conversion - very
easily. Whether or not it will be a success is hard to
say; it's loaded nearly 3 million rows so far, with
over 8,000 errors recorded.
But I'm going to download DB Tools, as I have frequent
David Blomstrom wrote:
Thanks for both your tips. I discovered by chance that
Navicat (which I have) will do the conversion - very
easily. Whether or not it will be a success is hard to
say; it's loaded nearly 3 million rows so far, with
over 8,000 errors recorded.
3 million records in an
You want a LEFT JOIN:
SELECT table1.title, table2.feature
FROM table1
LEFT JOIN table2 USING (sku)
WHERE table1.sku in ($sku1, $sku2, $sku3)
ORDER BY FIELD(table1.sku, $sku1, $sku2, $sku3) ASC
I strongly suggest picking up Paul DuBois' MySQL:
http://www.kitebird.com/mysql-book/
Gran Giddens writes:
SELECT table1.title, table2.feature FROM table1,
table2 WHERE (table1.sku = $table2.sku) AND table1.sku
in ($sku1, $sku2, $sku3) ORDER BY FIELD(table1.sku,
$sku1, $sku2, $sku3) ASC
...
How can I run my query to get 3 results and if the
feature is missing still return the
I have been using SQLyog for quite some time now to
import data from Access and SQL Server database.
www.webyog.com
Regards,
Karam
--- Ricky Groleau [EMAIL PROTECTED] wrote:
Hello,
I have tried and i have failed. I am trying to help
out a non-profit site in their move. The old site
. There must be
some documentation on how to use MDB files and get data from them.
Rhino
- Original Message -
From: Ricky Groleau
To: Rhino ; Ricky Groleau ; mysql@lists.mysql.com
Sent: Saturday, March 26, 2005 10:35 AM
Subject: Re: Need help coverting MDB SQL
- Original Message -
From: Ricky Groleau [EMAIL PROTECTED]
To: mysql@lists.mysql.com
Sent: Saturday, March 26, 2005 10:13 AM
Subject: Need help coverting MDB SQL
Hello,
I have tried and i have failed. I am trying to help out a non-profit site
in their move. The old site had a
..is it the IP or
web address? Where is SQL hidden on a linux/apache server?
---Original Message---
From: Rhino
Subject: Re: Need help coverting MDB SQL
Sent: Mar 26 2005 10:26:58
- Original Message -
From: Ricky Groleau
To:
Sent: Saturday, March 26, 2005 10:13 AM
Subject
on how to use MDB files
and get data from them.
Rhino
- Original Message -
From:
Ricky Groleau
To: Rhino ; Ricky Groleau ; mysql@lists.mysql.com
Sent: Saturday, March 26, 2005 10:35
AM
Subject: Re: Need help coverting MDB
SQL
Microsofts Acesss that makes ASP
PROTECTED]
Sent: 26 March 2005 19:28
To: Ricky Groleau; mysql@lists.mysql.com
Subject: Re: Need help coverting MDB SQL
Sorry, I don't know how to help you with this; I've never really worked
with MDB files or ASPs. I have no experience with the tools that you are
using to extract data
I couldn't find much on the variable you were trying to change.
Although it may have changed and now be called ft_boolean_syntax. But
that still won't help you since it doesn't appear to have an option to
change the default separator.
I think you will need to add the + to each word if you want
Hi!
On Mar 23, Jessica Svensson wrote:
Is there any way i can get results with AND instead of OR?
Trying to search for black cat should only return records that contains
both black and cat.
I'm using the following code to get my result:
SELECT * FROM `searchtbl` WHERE MATCH (text)
show results with all words present.
This is what i did, set global ft_boolean_syntax = ' +-()~*:|'
I really appreciate your help!!
From: Sergei Golubchik [EMAIL PROTECTED]
To: Jessica Svensson [EMAIL PROTECTED]
CC: mysql@lists.mysql.com
Subject: Re: Please help me: Boolean fulltext searches
= ' +-()~*:|'
I really appreciate your help!!
From: Sergei Golubchik [EMAIL PROTECTED]
To: Jessica Svensson [EMAIL PROTECTED]
CC: mysql@lists.mysql.com
Subject: Re: Please help me: Boolean fulltext searches, AND instead of OR
Date: Wed, 23 Mar 2005 22:32:49 +0100
Hi!
On Mar 23, Jessica Svensson
But when I execute a complex query, it hangs there forever. I don't have
a chance to see the result because I need to go home to have dinner. The
same query run in a FreeBSD system in Mysql5.01 just takes 2 seconds.
Please, execute this statements while the huge query is running,
and send
In article [EMAIL PROTECTED],
Jim McAtee [EMAIL PROTECTED] writes:
In another table like this with month/year fields I once created a
dummy date field that I populated with the date of the first of the
month (1/month/year), just to facilitate queries like this. Is
there another approach? Can
correction in question below, the problem is not in record '7047' but in
the record which starts with the name 'Triad'
also ... I'm using 4.0.20-standard-log
-Original Message-
From: Rob Brooks [mailto:[EMAIL PROTECTED]
Sent: Monday, February 28, 2005 2:56 PM
To: mysql@lists.mysql.com
Properly, NULL values should be matched with 'foo IS NULL', as opposed
to 'foo = NULL' which, by standard definition, always returns false
regardless of the value of foo
- michael dykman
On Mon, 2005-02-28 at 16:02, Rob Brooks wrote:
correction in question below, the problem is not in record
NULL is an unknown value. Consequently, you cannot compare NULLs the way
you expect. Effectively, = NULL is always false. Instead of
items_online.ID = NULL
you have to use
items_online.ID IS NULL
Michael
Rob Brooks wrote:
correction in question below, the problem is not in record '7047'
In article [EMAIL PROTECTED],
Rob Brooks [EMAIL PROTECTED] writes:
The only difference in the 2 statements is the 'where items_online.ID =
NULL' part.
Clearly in the first set, items_online.ID = NULL in record 7047 ...
Nope. items_online.ID IS NULL for that record, but comparing anything
=
Found some help here:
http://forums.mysql.com/read.php?10,10572,11064#msg-11064
UPDATE Table1 SET Table1.Field1 = (
SELECT count(*) FROM Table2 WHERE Table2.Code2=Table1.Code1
)
and that query works for me, great!!
But I still don't understand why it updates properly without the WHERE
clause.
So
-Original Message-
From: Daevid Vincent
Sent: Friday, February 11, 2005 14:32
To: mysql@lists.mysql.com
Subject: Need help with historic aggregation of data
I need to get the aggregate data from various tables for a report.
The idea is that we audit devices daily on a schedule,
select test, max(audit_date)
from your_table
where device = 1
group by test
order by 1
--- Daevid Vincent [EMAIL PROTECTED] wrote:
I need to get the aggregate data from various tables
for a report.
The idea is that we audit devices daily on a
schedule, and also allow users
to audit the
rmck wrote:
I have two tables:
DB 1:
Table A:
Userid:
Dept:
DB 2:
Table B:
Userid:
Dept:
Location:
How would I query from DB 1 Table A for the Dept if I want to use that value for DB 2's Dept?
Both DBs and tables have the same Userid.
Does not work:
Use 2;
Select A.Dept from A where B.Userid =
You should *ALWAYS* indicate which version of MySQL you are using when you
ask this sort of question; the answers is almost always it depends: if you
are using 3.x, do X, if you are using 4.0.x do Y, if you are using 4.1.x do
Z. It's a lot of work to list all of those options and most people won't
On 1/20/05 11:16 AM, Rhino [EMAIL PROTECTED] wrote:
You should *ALWAYS* indicate which version of MySQL you are using when you
ask this sort of question; the answers is almost always it depends: if you
are using 3.x, do X, if you are using 4.0.x do Y, if you are using 4.1.x do
Z. It's a lot
Mike Zornek [EMAIL PROTECTED] wrote on 01/20/2005 11:01:38 AM:
I have the following query which will get me all of the emails for my
current membership:
SELECT email.email_address
FROM member, email
WHERE
member.member_primary_email_id = email.email_id
AND member.member_standing !=
Cc: Rhino [EMAIL PROTECTED]
Sent: Thursday, January 20, 2005 11:26 AM
Subject: Re: Need help forming SQL query
On 1/20/05 11:16 AM, Rhino [EMAIL PROTECTED] wrote:
You should *ALWAYS* indicate which version of MySQL you are using when
you
ask this sort of question; the answers is almost
There is one record in the Events table for each event that an organization
is promoting. For each event, there could be 0 to 'n' files that give more
information about the event, such as pictures, audio clips, or whatever. I
want to display all the information about the event, including all
- Original Message -
From: Rhino [EMAIL PROTECTED]
To: mysql mysql@lists.mysql.com
Sent: Thursday, December 30, 2004 9:03 AM
Subject: Need help with SELECT
I am trying to think of SQL that will let me show a one to many
relationship
as a single row in a result set. They say a picture
Jason Caldwell wrote:
Hi
I have two tables; tbl_Headers and tbl_SubItems.
tbl_Headers contain my Header Items such as (fields: ID HEADER)
ID HEADER
---
1.00 TOPIC ONE
2.00 TOPIC TWO
3.00 TOPIC THREE
tbl_SubItems contain Sub Header Items such as (fields: ID SUBITEM)
Those are pretty much standard settings
I had ours set almost exactly like that, and performance was worse
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
22, 2004 7:12 PM
To: Anil Doppalapudi
Cc: mysql@lists.mysql.com
Subject: Re: Restore help! been going 2 weeks
Those are pretty much standard settings
I had ours set almost exactly like that, and performance was worse
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
Anil Doppalapudi wrote:
ours is InnoDB. we are not getting any performance problems with the
settings. it is working fine since last 1 Year. to my knowledge due to
myisam type you are getting performance issue.
Thanks
Anil
based on this email list, myisam is prefered for heavy query/index use,
: Monday, December 20, 2004 5:56 PM
To: matt_lists
Cc: Anil Doppalapudi; [EMAIL PROTECTED]
Subject: Re: Restore help! been going 2 weeks
matt_lists wrote:
Can you post your my.ini or my.cnf
sense your restore actually worked
Mine is not swapping, in fact, mysql is only using 610,824 K of ram
matt_lists wrote:
Can you post your my.ini or my.cnf
sense your restore actually worked
Mine is not swapping, in fact, mysql is only using 610,824 K of ram,
there is still over 1 gig of ram free
Our next server will have 16 gig of ram and quad xeons, I'm going to
completely disable the swap
matt_lists wrote:
matt_lists wrote:
Can you post your my.ini or my.cnf
sense your restore actually worked
Mine is not swapping, in fact, mysql is only using 610,824 K of ram,
there is still over 1 gig of ram free
Our next server will have 16 gig of ram and quad xeons, I'm going to
completely
Are you sure innodb is better for tables larger than 4 gig?
| 12 | xotech | localhost:3115 | finlog | Query | 238224 | copy to tmp
table | alter table bragg_stat engine=innodb pack_keys=0 |
| 14 | xotech | localhost:3356 | NULL | Query | 0 |
NULL |
: matt_lists [mailto:[EMAIL PROTECTED]
Sent: Friday, December 17, 2004 12:11 AM
To: Anil Doppalapudi
Cc: [EMAIL PROTECTED]
Subject: Re: Restore help! been going 2 weeks
Anil Doppalapudi wrote:
it is not normal. i have restored 90 GB database in 2 days on dell server
with 2 GB RAM.
Are you able
Can you post your my.ini or my.cnf
sense your restore actually worked
Mine is not swapping, in fact, mysql is only using 610,824 K of ram,
there is still over 1 gig of ram free
Our next server will have 16 gig of ram and quad xeons, I'm going to
completely disable the swap files
--
MySQL
The restore is still running
is this normal? How do you all deal with customers that do not have
their data for almost 3 weeks, and no end in sight
I've had oracle crashes before, the restores were very simple, this is not
I am very disappointed with mysql's performance with files over 5 gig
is going on
then check your my.cnf parameters.
Anil
-Original Message-
From: matt_lists [mailto:[EMAIL PROTECTED]
Sent: Thursday, December 16, 2004 6:15 PM
To: [EMAIL PROTECTED]
Subject: Re: Restore help! been going 2 weeks
The restore is still running
is this normal? How do you all deal
Almost all my MYD files are more than 4 gig
I was not aware of this limitation
I tested with InnoDB and found it horribly slow for what we do
Anil Doppalapudi wrote:
check your .myd file size. if table type is myisam and it it is more than 4
GB then convert it to InnoDB.
--Anil
--
MySQL
Nobody else has problems with restores on 8+ gig tables?
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
check your .myd file size. if table type is myisam and it it is more than 4
GB then convert it to InnoDB.
--Anil
-Original Message-
From: matt_lists [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 14, 2004 8:36 PM
Cc: [EMAIL PROTECTED]
Subject: Re: Restore help! been going 2 weeks
Thanks for your inputs Eric.
I tried this but it couldn't give me any insight abt
how can optimize this
for space saving of temp tables.
Maybe I am not expert enough to interpret this
output, so here it is -
- Manish
Seeing the explain log, it looks to me like you donot
have any index defined
Grant Giddens wrote:
I have a new project I'm working for and I was
wondering if anyone could help me optimize my selects
for speed. I have a table with about 500,000 entries.
The table structure I'm using is (via my PHP
commands):
$sql = CREATE TABLE $store_data_table (
At 1:09 PM -0700 11/29/04, [EMAIL PROTECTED] wrote:
I want to put a table in Ram (HEAP) with a field of at least 500
characters. I do I do this if Blob and text are not allowed?
The glib answer would be: you can't.
Two alternatives would be: (1) split your text field up into as many
Create a myISAM table and put the table on a RAM DISK. It will support
everything that heap does and more, like ranges ( 4.1 only allows Hash
lookups).
CREATE TABLE TABLE NAME (
..
) INDEX DIRECTORY = /dev/shm DATA DIRECTORY = /dev/shm
DVP
Dathan Vance Pattishall
Your original query (implicit INNER JOINs):
SELECT teu.name, eca.owner_id, ece.value
FROM typed_enterprise_unit teu,
e_contact_association eca,
e_contact_entry ece
WHERE teu.unit_id=eca.owner_id
and eca.entry_id=ece.entry_id
and eca.type_id=68
and
The attachment describing your tables didn't come through. However,
here's roughly how your SELECT statement might look:
SELECT Order.id_order, Employee.name_employee,
ItemsOrder.date_order, Unit.name_unit, ItemsOrder.status_order
FROM Order, Employee, ItemsOrder, Unit
WHERE
I prefer to explicitly declare my INNER JOINs (not to imply them by using
commas to make a list of tables). That way I avoid accidentally creating
any Cartesian products of any tables by leaving out a WHERE condition.
Missing ON conditions are much easier to spot (IMHO).
- Original Message -
From: Keith Warren [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, October 26, 2004 5:15 PM
Subject: Query Help
I'm converting from LassoMySQL (MySQL 3.23.54) to the current version of
MySQL, and I'm running into a query problem.
In article [EMAIL PROTECTED],
John Mistler [EMAIL PROTECTED] writes:
I need help coming up with the following query:
My table:
+-+--+
| rowID | dateOfPurchase |
+-+--+
| 1 | '2004-1-17 08:00:00' |
Please post the structure of your orders table. (SHOW CREATE TABLE
orders). I need to know what you are using as a primary key in order to
help you to uniquely identify each duplicated row.
Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine
Paul Fine [EMAIL PROTECTED] wrote
If you are using 4.1, you can look into the GROUP_CONCAT function.
Otherwise, try a self join like this:
SELECT A.LastName,A.OrderNum,B.OrderNum
FROM Orders AS A
LEFT JOIN Orders AS B ON A.LastName=B.LastName
WHERE A.OrderNum!=B.OrderNum
ORDER BY A.LastName
That joins the Order table with itself
Brent Baisley wrote:
If you are using 4.1, you can look into the GROUP_CONCAT function.
Otherwise, try a self join like this:
SELECT A.LastName,A.OrderNum,B.OrderNum
FROM Orders AS A
LEFT JOIN Orders AS B ON A.LastName=B.LastName
WHERE A.OrderNum!=B.OrderNum
ORDER BY A.LastName
That joins the
[snip]
$dbhost = 'localhost';
[/snip]
Try changing this to 127.0.0.1
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
This is the right place to ask the question but we could be a lot more
helpful if you told us two additional things:
1. Which version of MySQL are you using? (Different versions of MySQL have
different SQL capabilities so we don't want to show you a solution which
wouldn't work on your version.)
Add Backup date to your SELECT clause _and_ your GROUP BY clause.
SELECT count(1) as attempts, client, status, bkupdate
FROM bpdjobs
WHERE Status not in (0,1)
GROUP BY bkupdate, status, client
HAVING attempts 5
This will break your report down by date, then status, then client
Shawn Green
]
Subject: Re: Query Help
Add Backup date to your SELECT clause _and_ your GROUP BY clause.
SELECT count(1) as attempts, client, status, bkupdate
FROM bpdjobs
WHERE Status not in (0,1)
GROUP BY bkupdate, status, client
HAVING attempts 5
This will break your report down by date
Robb:
http://dev.mysql.com/doc/mysql/en/JOIN.html
I am assuming all the information you need is student name + city
name. SELECT * FROM StudentTable AS s, CityTable AS c WHERE s.CityID =
c.CityID
Wes
On Wed, 8 Sep 2004 19:55:29 -0500, Robb Kerr
[EMAIL PROTECTED] wrote:
Trying to get my mind
The manual is your friend: http://dev.mysql.com/doc/mysql/en/SELECT.html
Pay attention to the portion about the LIMIT clause.
Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine
Randy Paries [EMAIL PROTECTED] wrote on 09/07/2004 04:15:28 PM:
Hello,
I have a table
- Original Message -
From: Ronan Lucio [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, August 25, 2004 5:12 PM
Subject: Query Help
Hi,
I sorry for I neither didnĀ“t find the information that I need in
the documentation nor found the correct words for a search
in the
Are you assuming that all months have 30 days? You can use the same syntax
with INTERVAL 1 MONTH
I would also format the date comparison to use the same precision that the
DATE_ADD function outputs.
So,
DATE_ADD(table.date, INTERVAL 1 MONTH) = DATE_FORMAT(CURDATE(), '%Y-%m-%d')
I might be off
Redmond Militante wrote:
hi
i need advice on a query i'm trying to do. i'm trying to find
entries with that are about to expire. entries expire if their date
of submission is older than 60 days. i want to find all entries with
a date of submission greater than 30 days, or those that are going
David Perron wrote:
Are you assuming that all months have 30 days? You can use the same syntax
with INTERVAL 1 MONTH
True.
I would also format the date comparison to use the same precision that the
DATE_ADD function outputs.
Why would you do that? The date column contains a DATE. CURDATE()
awesome. thank you!
[Wed, Aug 25, 2004 at 06:27:38PM -0700]
This one time, at band camp, David Perron said:
Are you assuming that all months have 30 days? You can use the same syntax
with INTERVAL 1 MONTH
I would also format the date comparison to use the same precision that the
select name
from mytable a
where changedate
(select changedate
from mytable b
where a.name=b.name
and a.changedate != b.changedate);
or:
select name
from mytable a
where exists
(select * from mytable b
Hi Claire,
On Mon, 23 Aug 2004 14:52:29 -0700 (PDT), Claire Lee [EMAIL PROTECTED] wrote:
Hi,
Here's a table of mine
namedate changeDate
n1d1 cd1
n2d1 cd3
n2d2 cd1
n4d1 cd2
n1d2 cd5
n5d1
501 - 600 of 1409 matches
Mail list logo