Thanks Peter - you gave me some ideas...
here is what I have so far (simplified for simplification..)
select t2.dt_aud_rec, t1.id_secr_rqst from isr2_aud_log t1, isr2_aud_log t2
where t1.id_secr_rqst=t2.id_secr_rqst
and t1.dt_aud_rec t2.dt_aud_rec
group by t1.id_secr_rqst
but the problem is
Anoop kumar V [EMAIL PROTECTED] wrote on 05/24/2005 03:02:11 PM:
Thanks Peter - you gave me some ideas...
here is what I have so far (simplified for simplification..)
select t2.dt_aud_rec, t1.id_secr_rqst from isr2_aud_log t1, isr2_aud_log
t2
where t1.id_secr_rqst=t2.id_secr_rqst
and
My profound apologies
here is the table create structure.
the biggest problem i think is that this table does not have any primary
keys or atleast unique columns: (I think joins require unique columns)
mysql show create table isr2_aud_log\G
*** 1. row
hi All,
I need to create a query using no subqueries as I use 4.0.23 which does not
support subqueries. I cannot upgrade for some compellimg reasons (the
product does not support anything later than 4.0.23nt as of now). I also
cannot use any thing that is native to mysql - in the sense that
Hi Anoop
Try:
SELECT t1.id_secr_rqst, t2.name_rec_type, t1.dt_aud_rec
FROM isr2_aud_log t1, isr2_aud_log t2
WHERE t1.id_secr_rqst =
t2.id_secr_rqst AND
t1.name_rec_type='Exception Resource'
ORDER by t1.dt_aud_rec DESC
LIMIT 2;
Peter Normann
--
MySQL General Mailing List
For list archives:
Thanks Peter - but I see two issues:
1. It returns data about only one id_secr_rqst - I want it to return data
about every id_secr_rqst in the table.
2. Limit IMO is mysql specific (I hope I am wrong) is there something
generic so I dont need to bother about which database I am running it
Anoop kumar V mailto:[EMAIL PROTECTED] wrote:
1. It returns data about only one id_secr_rqst - I want it to return
data about every id_secr_rqst in the table.
So, if I understand you correctly (sorry, having a bad day), you want all
records for the past two days?
Assuming this, you could use
Anoop kumar V mailto:[EMAIL PROTECTED] wrote:
well - actually it might not be the last 2 days - i just want 2 of
the latest records for every task regardless of what date it is in
the table.
Okay, now I think I understand what you need - and if I am correct, this
looks like one of the more
Ron Watson wrote:
This works, but only if a title and a role exists for the company member.
Basically, I want to display the season name from tbl Season, then the show
title from tbl Shows, then the roles from cast and titles from
production_team for the company member.
- use LEFT JOINs.
-
Hello.
I'm looking for some help on a complicated query. I have data in 5 different
tables I want displayed on this page. The query I have now is
$query = SELECT Shows.Season_RID AS SEASON_NUM,
Shows.Show_Name AS NAME,
Shows.Show_RID
I've got the following query that produces a large table for me.
SELECT
router.name AS Router,
SUM(IF(speed='64000',1,0)) AS 64K,
SUM(IF(speed='128000',1,0)) AS 128K,
SUM(IF(speed='192000',1,0)) AS 192K,
SUM(IF(speed='256000',1,0)) AS 256K,
SUM(IF(speed='384000',1,0)) AS
The query as written works just fine although I'm certain there's got to be
a more efficient way of doing the same thing. I'm relatively new to MySQL
so I took the brute force approach.
My problem is that I want to produce totals of each of the columns and can't
figure out how to do it. Any
I've been trying to work out a complicated query to select and
sum multiple columns in one select using a condition and multi column group by
What I expected to get was ONE row with the columns summed .
this query returns 5 rows
SELECT sum(`AllTheWeb`),sum(`AltaVista`),sum(`AOL`),sum(`Ask
* TimeWalker
I've been trying to work out a complicated query to select and
sum multiple columns in one select using a condition and multi
column group by
What I expected to get was ONE row with the columns summed .
this query returns 5 rows
SELECT sum(`AllTheWeb`),sum
hi,
i am trying to move one of the databases we have in access
to mysql and i have come accross a query that mysql doesnt like:
SELECT Managers.Manager, Agents.Agent, Modules.Module, Messages.MLevel,
Messages.Title, MessageInstance.Name, MessageInstance.Info, PolicyRuns.JobNo,
Policies.Policy
I have a table with the columns names and id. I want to be able to find all
names with an id of '03' that do not have other records with id values of
'10','20' or '37'.
Is this even possible to do?
name id
a03
a11
a12
a13 I want 'a' because it has a 03 and
Needs to be done programmatically
-Original Message-
From: Jerry Rehak [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 09, 2002 10:53 AM
To: [EMAIL PROTECTED]
Subject: Complicated Query?
I have a table with the columns names and id. I want to be able to find all
names with an id
* Jerry Rehak
I have a table with the columns names and id. I want to be able
to find all
names with an id of '03' that do not have other records with id values of
'10','20' or '37'.
Is this even possible to do?
name id
a 03
a 11
a 12
a 13 I want 'a' because
hi,
i am trying to build a message board in php with mysql as back end;
what i want to do is to query the database in a certain way that the
result is returned in the correct order for php to display the discussion
thread properly
here is my table structure:
mysql show fields from posts
hi,
i am trying to build a message board in php with mysql as back end;
what i want to do is to query the database in a certain way that the result
is returned in the correct order for php to display the discussion thread
properly
here is my table structure:
mysql show fields from posts
try
ORDER BY (Category = 'Other'), Category, Subcategory
It should work, (I hope ^_-;;;)
- Original Message -
From: Jeff Shipman - SysProg [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, April 20, 2001 8:38 PM
Subject: complicated query
I would like to do something similar
Hi there,
I'm having a problem on my complicated query.
My question is similar to the question in a couple of emails earlier in
this mailing list which subject's is complicated query.
I got 3 tables below.
test1 table
++--+
| id | name |
++--+
| 1 | fumi |
| 2 | ali |
| 3
I would like to do something similar to an ORDER BY
in one of my select statements, but I'mt not sure
how to do something as complicated as this:
I have two columns, category and subcategory, that
I am retrieving. I would like category and subcategory
to be sorted alphabetically. This is easy
with an a as far as the order by is
concerned, while other is zz for sorting purposes.
-Original Message-
From: Jeff Shipman - SysProg [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 20, 2001 2:39 PM
To: [EMAIL PROTECTED]
Subject: complicated query
I would like to do something similar
"Jeff Shipman - SysProg" [EMAIL PROTECTED] wrote:
I would like to do something similar to an ORDER BY
in one of my select statements, but I'mt not sure
how to do something as complicated as this:
I have two columns, category and subcategory, that
I am retrieving. I would like category and
On Fri, Apr 20, 2001 at 03:39:59PM -0400, Steve Werby wrote:
"Jeff Shipman - SysProg" [EMAIL PROTECTED] wrote:
I would like to do something similar to an ORDER BY
in one of my select statements, but I'mt not sure
how to do something as complicated as this:
I have two columns, category
}
} You don't need to create another column, just use:
}
} ORDER BY category = 'other', category
}
Are you sure this works? My query is:
select category,subcategory from categories ORDER BY
category = 'other', category;
And I get:
ERROR 1064: You have an error in your SQL syntax
near '=
, while other is zz for sorting purposes.
}
}
} -Original Message-
} From: Jeff Shipman - SysProg [mailto:[EMAIL PROTECTED]]
} Sent: Friday, April 20, 2001 2:39 PM
} To: [EMAIL PROTECTED]
} Subject: complicated query
}
}
} I would like to do something similar to an ORDER BY
} in one of my
On Fri, Apr 20, 2001 at 03:09:32PM -0600, Jeff Shipman - SysProg wrote:
}
} You don't need to create another column, just use:
}
} ORDER BY category = 'other', category
}
Are you sure this works? My query is:
select category,subcategory from categories ORDER BY
category = 'other',
29 matches
Mail list logo