Michael DePhillips wrote:
Hi Dan,
Thanks for the prompt reply,
As I described it yes, you are correct, however, the id may not always
be one(1) value away. So the number one needs, somehow, to be replaced
with a way to get the "next largest value " and the "previous less
than" value.
Sorr
Hi Dan,
Thanks for the prompt reply,
As I described it yes, you are correct, however, the id may not always
be one(1) value away. So the number one needs, somehow, to be replaced
with a way to get the "next largest value " and the "previous less than"
value.
Sorry for the lack of precision
Michael DePhillips wrote:
Hi,
Does anyone have a clever way of returning; a requested value with
one value less than that value, and one value greater than that value
with one query.
For example T1 contains
ID
1234
1235
1236
1238
Assuming the id's are consecutive.
You want surounding
Michael,
I would think this is what you want.
Select ID from T1 where ID BETWEEN ( - 1) and ( + 1)
If you want distinct values, place the distinct keyword in front of ID (i.e.
Select DISTINCT ID...
This should do it for you.
-Dan
Hi,
Does anyone have a clever way of returning; a requested
Not until we know the logic behind the "code" and how the calculations
should be done.
-Original Message-
From: VenuGopal Papasani [mailto:[EMAIL PROTECTED]
Sent: Monday, August 14, 2006 1:03 PM
To: Peter Lauri; mysql@lists.mysql.com
Subject: Re: query needed
if it is stat
if it is static then it works fine.but we have lots of codes in a table
which should be done similar operation.instead varifying staticly with c1,c2
can we make dynamic.
On 8/14/06, Peter Lauri <[EMAIL PROTECTED]> wrote:
SELECT SUM(IF(code='c1', code, IF(code='c2', code, 0))) -
SUM(IF(code='c4'
SELECT SUM(IF(code='c1', code, IF(code='c2', code, 0))) - SUM(IF(code='c4',
code, IF(code='c5', code, 0))) FROM datavalue;
-Original Message-
From: VenuGopal Papasani [mailto:[EMAIL PROTECTED]
Sent: Monday, August 14, 2006 11:26 AM
To: mysql@lists.mysql.com
Subject: query needed
Hi,
i
Once again i send the table data:
Code Period Value
c1 2004 22
c1 2005 10
c2 2005 15
c3 2005 20
c4 2005 15
c5 2005 5
c6 2005 30
c7 2005
VenuGopal Papasani wrote:
Hi,
i got a table datavalue as follows
code period value
c1 20051
c2 20052
c32006 3
I figured it out. Thanks for listening. I maybe just needed to vent.
-Original Message-
From: Josh Milane [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 08, 2006 12:46 PM
To: mysql@lists.mysql.com
Subject: query logging is making me mental!
Hello Everyone,
I am hoping that someone
Mazur Worden, Kathy wrote:
which column(s) isn't found? Would it happen to be any of the columns
you're using a function on? I ask because aliasing those might help.
I can confirm that passing the full db name will work with ASP through a
recordset. I've set them up like this:
Set objConn
On 8/8/06, Josh Milane <[EMAIL PROTECTED]> wrote:
I installed MYSQL 5 along with PHP and apache 2 as part of the XAMPP
stack put out by ApacheFriends. I am putting together a few CMS sites
and think the product is great.
I don't. IMHO anything that hides stuff you SHOULD know to use the
softwa
27; OR (NST.VAL = 'Fred' AND NSV.REF_ID IS NULL)
)
How do I generally simplify this?
R.
-Original Message-
From: Robert DiFalco [mailto:[EMAIL PROTECTED]
Sent: Friday, August 04, 2006 4:12 PM
To: [EMAIL PROTECTED]
Cc: mysql@lists.mysql.com
Subject: RE: Query Help for Loosely Coupl
To: Mazur Worden, Kathy
Cc: mysql@lists.mysql.com
Subject: Re: Query two databases
Mazur Worden, Kathy wrote:
I've had success using the fully qualified db, table and
column name in
a single query like yours below.
Mazur Worden, Kathy wrote:
I've had success using the fully qualified db, table and column name in
a single query like yours below. Have you tried sending strSQLCombo
through either strConnProd or strConnSales already?
K. Mazur Worden
Kathy,
Just tried referencing one and got the "Item cann
I've had success using the fully qualified db, table and column name in
a single query like yours below. Have you tried sending strSQLCombo
through either strConnProd or strConnSales already?
K. Mazur Worden
> -Original Message-
> From: brent [mailto:[EMAIL PROTECTED]
> Sent: Monday, A
On 8/5/06, Karl Larsen <[EMAIL PROTECTED]> wrote:
I am using Linux called Fedora Core 4. I had no problem getting
mysql 4 working here and liked it a lot. But when I discovered 4 doesn't
have VIEW but 5 does I have tried several RPM sets of 5 that fail for
basic reasons. The reasons are the w
e-
From: Jay Pipes [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 02, 2006 9:37 AM
To: Robert DiFalco
Cc: mysql@lists.mysql.com
Subject: Re: Query Help for Loosely Couple Properties
On Tue, 2006-08-01 at 16:23 -0700, Robert DiFalco wrote:
> The question is, how do I query this? Say I w
On 8/3/06, André Hänsel <[EMAIL PROTECTED]> wrote:
Hi Dan, hi Obed,
of course I have no specific username, I want the last 5 downloads of each
distinct username in the table. :)
i was thinking a lot... and i can't find the solution but maybe yo
can do somthing like this
select user,downl
At 03:08 PM 8/3/2006, André Hänsel wrote:
Hi,
I have a table logging downloads (time, username, download).
Now I'd like to have the last 5 downloads per user.
Can someone tell me a solution (or what to search for)?
Regards,
André
--
MySQL General Mailing List
For list archives: http://list
For a specific username:
SELECT username, time, download
FROM table
WHERE username = 'someusername'
ORDER BY time DESC
LIMIT 5
Dan
On 8/3/06, André Hänsel <[EMAIL PROTECTED]> wrote:
Hi,
I have a table logging downloads (time, username, download).
Now I'd like to have the last 5 downloads per
On 8/3/06, André Hänsel <[EMAIL PROTECTED]> wrote:
Hi,
I have a table logging downloads (time, username, download).
Now I'd like to have the last 5 downloads per user.
Can someone tell me a solution (or what to search for)?
SELECT download FROM table WHERE username='user' ORDER BY time DES
On Tue, 2006-08-01 at 16:23 -0700, Robert DiFalco wrote:
> The question is, how do I query this? Say I want all records from table
> T whose COLOR property value is ORANGE.
>
> The only thing I can come up with (and I'm no SQL expert and this looks
> wrong to me) is the following:
>
> SELECT *
>
--On August 2, 2006 5:25:51 PM +0800 wangxu <[EMAIL PROTECTED]> wrote:
I have a problem about the performance of federated engine. The
mysql5.0 reference manual says that the FEDERATED tables do not work with
the query cache, aren't they? How about the query cache used by the
federated eng
They are user defined properties.
-Original Message-
From: Jay Pipes [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 01, 2006 8:11 PM
To: Robert DiFalco
Cc: mysql@lists.mysql.com
Subject: Re: Query Help for Loosely Couple Properties
On Tue, 2006-08-01 at 16:23 -0700, Robert DiFalco
On Tue, 2006-08-01 at 16:23 -0700, Robert DiFalco wrote:
> I have a table that contains properties that can be associated with any
> table whose primary key is a LONG. Lets say that there is just one kind
> of property. The table looks something like this:
>
> TABLE StringVal
> REF_ID B
>What query do I need to get
>AccommodationName and what attractions it has from
AccommodationAttractions
SELECT
ac.accommodationname,
at.attractionname
aa.AccomodationAttraction
FROM
accommodationattractions AS aa
INNER JOIN accommodations AS ac USING (accommodationid)
INNER JOIN attractio
ouping.State = advisor_counts.State
AND primary_grouping.Sub = advisor_counts.Sub
AND primary_grouping.ChapterType = advisor_counts.ChapterType;
- Original Message - From: "Jay Pipes" <[EMAIL PROTECTED]>
To: "Jesse" <[EMAIL PROTECTED]>
Cc: "mysql"
timing. However, if I can get your more efficient query working, I
would like to. Any ideas why it's not working?
Thanks,
Jesse
- Original Message -
From: "Jay Pipes" <[EMAIL PROTECTED]>
To: "Jesse" <[EMAIL PROTECTED]>
Cc: "mysql"
Sent
Jesse wrote:
I worked with the query for a while, trying equi-joins instead of JOINs,
and variuos other things. I found that the queries that I was using to
represent the TotMem & TotAdv columns was what was closing things down.
I finally ended up using a sub-query to solve the problem. I ga
pterType) AS sq ORDER BY State, Sub, ChapterType
Anyway, thanks for your help.
Jesse
- Original Message -
From: "Dan Buettner" <[EMAIL PROTECTED]>
Cc: "Jesse" <[EMAIL PROTECTED]>; "mysql"
Sent: Monday, June 26, 2006 8:18 PM
Subject: Re: Query S
Hi John,
On 6/24/06, John Hicks <[EMAIL PROTECTED]> wrote:
Karl Larsen wrote:
> ..I was glancing through
the mamouth
> MySQL reference manual ...
I worked on an Oracle-9i development project around two years back.
If I recall correct
, 'PRIMARY,IX_Schools1',
'IX_Schools1', '18', 'bpa.S.State,bpa.S.Sub', 65, 'Using where'
2, 'DEPENDENT SUBQUERY', 'C1', 'ref',
'PRIMARY,IX_Chapters_1,IX_Chapters_2', 'IX_Chapters_1', '
27;, 'S1', 'ref', 'PRIMARY,IX_Schools1',
'IX_Schools1', '18', 'bpa.S.State,bpa.S.Sub', 65, 'Using where'
2, 'DEPENDENT SUBQUERY', 'C1', 'ref',
'PRIMARY,IX_Chapters_1,IX_Chapters_2', '
Jesse, can you post table structures ( SHOW CREATE TABLE tablename )
and the output you get from EXPLAIN followed by the query below?
Also what version of MySQL you're on, and high level details of the
hardware (RAM, disks, processors, OS).
That will all be helpful in trying to help you out he
From: "Price, Randall" <[EMAIL PROTECTED]>
To: "Jesse" <[EMAIL PROTECTED]>; "MySQL List"
Sent: Monday, June 26, 2006 4:47 PM
Subject: RE: Query Speed
Hi Jesse,
I am not 100% sure cause I have only been using MySQL for ~6 months but
I do read this mailing li
Hi Jesse,
I am not 100% sure cause I have only been using MySQL for ~6 months but
I do read this mailing list everyday and have learned a lot. I believe
that InnoDB tables to not maintain a count(*) for the tables so it has
to physically count the rows. I believe MyISAM tables do maintain that
c
Hello friends
Id like to thanks all friends that helped with this question
Regards
Luiz
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
John Hicks wrote:
Karl Larsen wrote:
I and a friend have written SQL to big Oracle DB but not much to
MySQL on our own computers. I find that there is a QUERY in the list
for MySQL but it does nothing much. Also I was glancing through the
mamouth MySQL reference manual and saw there are a b
Karl Larsen wrote:
I and a friend have written SQL to big Oracle DB but not much to
MySQL on our own computers. I find that there is a QUERY in the list for
MySQL but it does nothing much. Also I was glancing through the mamouth
MySQL reference manual and saw there are a bunch of tools that
luiz Rafael wrote:
SELECT * FROM `sav00_sava0400_dbf` WHERE 2000 = YEAR(`emissao`) OR
(1999 = YEAR(`emissao`) AND 12 < MONTH(`emissao`)) ORDER BY emissao ASC
Are you sure this is what you really want? MONTH() is never greater than
12, so your query is equal to:
SELECT * FROM `sav00_sav
Jay Pipes wrote:
SELECT * FROM `sav00_sava0400_dbf`
emissao BETWEEN '2000-01-01' AND '2000-12-31'
UNION ALL
SELECT * FROM `sav00_sava0400_dbf`
emissao BETWEEN '1999-12-01' AND '1999-12-31'
Why not:
SELECT * FROM `sav00_sava0400_dbf`
emissao BETWEEN '1999-12-01' AND '2000-12-31'
?? ;)
-
Hi Jay
Thanks for the help
Regards
Luiz
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
luiz Rafael wrote:
Dear friends
is their any way to optimize this query bellow, it take +- 2minutes do
complete, i think it becouse their no index by the emissao field
SELECT * FROM `sav00_sava0400_dbf` WHERE 2000 = YEAR(`emissao`) OR
(1999 = YEAR(`emissao`) AND 12 < MONTH(`emissao`)) O
I agree with Brent on what MySQL is doing ... are you seeing poor
performance with this query? If so, you might evaluate whether adding
an index on your 'post_date' column improves things, as MySQL may be
able to sort and thus LIMIT more quickly (using index in RAM rather than
reading off disk
MySQL is doing a file sort on the query result. It's not sorting the entire table and it's not sorting the 40 record limit you
specified. It's sorting the WHERE id IN... result. After the sort, then it will return just the first 40 records.
You can throw and EXPLAIN in front of the query to see
Thanks a lot!! :D
You were right. There was a bug. Upgrading to mysql 4.1.20 solved my
problem.
Daniel da Veiga wrote:
Check http://bugs.mysql.com/bug.php?id=12915
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAI
On 6/6/06, Eugene Kosov <[EMAIL PROTECTED]> wrote:
Hi, List!
I'm a little bit confused with (IMHO) poor query performance.
I have a table with 1'000'000 records.
Table consists of 2 service fields and a number of data fields. Service
fields are status and processor_id (added for concurrent que
Rhino wrote:
- Original Message - From: "John Meyer" <[EMAIL PROTECTED]>
To: "List: MySQL"
Sent: Tuesday, May 30, 2006 5:09 PM
Subject: Query problem
Setup
TITLES:
TITLE_ID
AUTHORS:
AUTHOR_ID
TITLE_AUTHOR:
(TITLE_ID,AUTHOR_ID)
Problem:
Given a title, I need to find all the aut
- Original Message -
From: "John Meyer" <[EMAIL PROTECTED]>
To: "List: MySQL"
Sent: Tuesday, May 30, 2006 5:09 PM
Subject: Query problem
Setup
TITLES:
TITLE_ID
AUTHORS:
AUTHOR_ID
TITLE_AUTHOR:
(TITLE_ID,AUTHOR_ID)
Problem:
Given a title, I need to find all the authors who are
Hi,
thank you for this hint. That worked excellent! Now the overall query
time is about 0.1 s on average.
Best regards,
Merlin
On Sat, 27 May 2006 02:14:34 -0700, "Merlin" <[EMAIL PROTECTED]> said:
> Well this is exactly the problem. The OR statement. Do you think there
> is
> another way aroun
Well this is exactly the problem. The OR statement. Do you think there
is
another way around the tmp table. I did not make the best experiances
with tmp tables.
regards,
merlin
On Sat, 27 May 2006 00:26:09 -0500, "mos" <[EMAIL PROTECTED]> said:
> Merlin,
> Lose the "OR" part of the Where
Merlin,
Lose the "OR" part of the Where clause and it should speed up. If so,
that's what you have to work on. You could execute 2 queries, where each
one writes the results to a temporary memory table and display that table
instead.
Mike
--
MySQL General Mailing List
For list archives: ht
>
To: "'Luke'" <[EMAIL PROTECTED]>;
Sent: Wednesday, May 24, 2006 2:16 AM
Subject: RE: Query problem: UNION in subquery
Hi Luke..
Try this
SELECT ObjectId FROM
(SELECT f15.Form15SampleTube1RnaBarcode AS ObjectId,
f15.Form15PatientID AS PtId FROM form15 f15
WHER
Hi Luke..
Try this
SELECT ObjectId FROM
(SELECT f15.Form15SampleTube1RnaBarcode AS ObjectId,
f15.Form15PatientID AS PtId FROM form15 f15
WHERE f15.Form15SampleTube1RnaBarcode IN ('01D2V','01DH6')
UNION
SELECT f15.Form15SampleTube6RnaBarcode AS ObjectId,
f15.Form15PatientID AS PtId
Perfect!
I tried aliasing the field names but didn't think about the table, and was
just stuck looking at that query without any idea...
Thanks a lot for your help.
melanie
From: Johan Höök <[EMAIL PROTECTED]>
To: mel list_php <[EMAIL PROTECTED]>
CC: mysql@lists.mysq
Hi,
I guess you should be able to do something like:
SELECT t1.term_id, t1.name, r.type_id, t2.term_id, t2.name
FROM term t1
LEFT JOIN relationTerm r ON r.term_id1 = t1.term_id
LEFT JOIN term t2 ON r.term_id2 = t2.term_id
/Johan
mel list_php skrev:
Hi!
I'm stuck with a join query
2 tables
> Not necessarily. I would think the CREATE SELECT statement would be
> the closest equivalent.
>
> http://dev.mysql.com/doc/refman/4.1/en/create-table.html
>
Thanks much for the reply, John. That surely would help with our future
applications. But this time, we only have read access to the
Bing Du wrote:
The following are Cold Fusion code. It's interesting that previously
defined queries can be used as 'tables' to pull data from.
===
SELECT db_entry_num, title
FROM account_info
SELECT projectID
Thanks that got it.
Robert Gehrig
Webmaster at www.gdbarri.com
e-mail: [EMAIL PROTECTED]
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
SELECT id, count(*) AS cnt
FROM `table_name`
GROUP BY id
ORDER BY cnt DESC
[ LIMIT 1 ]
--
Gabriel PREDA
Senior Web Developer
2006/4/18, Pedro mpa <[EMAIL PROTECTED]>:
> Greetings.
>
> I have Text fields in some tables which contain text in Portuguese with
> accent characters like á, à, é, í, ú, ü, ó, ö, ç, etc.
>
> When I query like:
>
> SELECT text_column
> FROM table
> WHERE text_column LIKE '%maçã%'
> [ or ]
> WHERE t
2wsxdr5 wrote:
> I have a table of people. Some of the people in this table are
> related. You can find out who is related by comparing a familyID
> number. I have a query to select a certain group of people from the
> table and I want to also select anyone who is related to them, even
> though
[EMAIL PROTECTED] wrote:
Yes, a ranged query should respond faster than a negation. In some cases
you can seriously improve query performance for a negation query if you
split it into two range queries unioned together. Here is a pseudo
example:
This query should be slow due to the table scan
Robert DiFalco wrote:
> In a previous database engine I was using an IN was more optimal than a
> <>. So, for example:
>
> SELECT * FROM table WHERE table.type IN (1,2,3);
>
> Where the possible values of type are 0-3, was appreciably faster than:
>
> SELECT * FROM table WHERE table.type <
ql.com
Subject: RE: Query Optimization Question
Yes, a ranged query should respond faster than a negation. In some cases
you can seriously improve query performance for a negation query if you
split it into two range queries unioned together. Here is a pseudo
example:
This query should be slow
>
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 13, 2006 6:37 AM
> To: Robert DiFalco
> Cc: mysql@lists.mysql.com
> Subject: Re: Query Optimization Question
>
>
>
>
> "Robert DiFalco" <[EMAIL PROTECTED]>
Shawn,
Any performance gains for specifying "type > 0" than "type <> 0" ?
R.
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, March 13, 2006 6:37 AM
To: Robert DiFalco
Cc: mysql@lists.mysql.com
Subject: Re
"Robert DiFalco" <[EMAIL PROTECTED]> wrote on 03/11/2006 12:43:43 PM:
> In a previous database engine I was using an IN was more optimal than a
> <>. So, for example:
>
> SELECT * FROM table WHERE table.type IN (1,2,3);
>
> Where the possible values of type are 0-3, was appreciably faster th
OKAN ARI wrote:
I have 3 tables
Table 1: user(id, name, surname)
Table 2: crime(id, detail)
Table 3: user_crime(id, user_id, crime_id)
Table 1
1, OKAN, ARI
Table 2
1, "detail 1"
2, "Detail 2"
Table 3
1, 1, 1
1, 1, 2
So user 1 takes 2 crime from crime table...
I want to receive info with 1 qu
On Wed, 8 Mar 2006 10:12:22 - <[EMAIL PROTECTED]> wrote:
> but I have two other filters which may or may not be chosen. (area, and
> interest).
>
> $query = "SELECT * FROM $table_name WHERE sname LIKE '$search_string%' AND
> area='area' AND interest='interest' ORDER BY fname $type";
>
>
Robert DiFalco wrote:
In a previous database engine I was using an IN was more optimal than a
<>. So, for example:
SELECT * FROM table WHERE table.type IN (1,2,3);
Where the possible values of type are 0-3, was appreciably faster than:
SELECT * FROM table WHERE table.type <> 0;
I
[EMAIL PROTECTED] wrote:
I am fairly new to sql and am now getting into the area of slightly
more complex queries.
At present my query is
$query = "SELECT * FROM $table_name WHERE sname LIKE '$search_string%'
ORDER BY fname $type";
but I have two other filters which may or may not be chosen
On 3/8/06, Adrian Bruce <[EMAIL PROTECTED]> wrote:
> one solution (may not be the best but would work) would be to use 'like'
> instead of '=' and then put wildcards %%$var % around the variable so
> that if it is not there then it wount effect the query.
>
Yeah, I use this kind of "trick" for SEL
one solution (may not be the best but would work) would be to use 'like'
instead of '=' and then put wildcards %%$var % around the variable so
that if it is not there then it wount effect the query.
Ade
[EMAIL PROTECTED] wrote:
I am fairly new to sql and am now getting into the area of slight
Peter Brawley wrote:
/>Now this query is run over two tables and the ab_members table contains
>around 302 rows. Around 1/3 of these will be where cup=kids. However,
>when this query is run it returns 20,700 results /
That's because your ...
FROM ab_leader_board ablb, ab_members abm
calls for
>Now this query is run over two tables and the ab_members table
contains
>around 302 rows. Around 1/3 of these will be where cup=kids.
However,
>when this query is run it returns 20,700 results
That's because your ...
FROM ab_leader_board ablb, ab_members abm
calls for a cross join--it a
Actually I am looking for duplicates (vedor_no, date), but I think I can
hopefully adapt the solution you have given me.
[EMAIL PROTECTED] wrote:
If you are looking just for duplicate (ID,vendort_no) combinations, this will
find them:
SELECT ID, vendor_no, count(1) as dupes
FROM table_name
If you are looking just for duplicate (ID,vendort_no) combinations, this
will find them:
SELECT ID, vendor_no, count(1) as dupes
FROM table_name_here
GROUP BY ID, vendor_no
HAVING dupes >1;
Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine
Richard Reina <[EMAIL PROTECTED]> wr
I's so sorry. You are very correct. The sample data is bad. ID should be
unique. Here it is corrected.
|ID| vendor_no| date|
|2354 | 578 | "2005-12-23"|
|2355 | 334 | "2005-12-24"|
|2356 | 339 | "2005-12-26"|
|2357 | 339
Richard,
If you mean with _both_ the same id _and_ vendor id, try this:
Select id, vendor_id, count(*) from tablename group by id, vendor_id;
If you just want separate counts for id and vendor_id, use:
Select id, count(*) from tablename group by id;
Select vendor_id, count(*) from tablename gr
> I am a novice when it come to queries such as this and was hoping
> someone could help me write a query that tells me how many records
> have the same ID and vendor number.
>
> |ID| vendor_no| date|
> |2354 | 578 | "2005-12-23"|
> |2355 | 334 |
> Again, I implore all SQL coders to use the explicit JOIN syntax on all
> platforms that support it (Oracle being a well-known exception). It makes
Oracle supports the ANSI JOIN syntax from v9 and up.
> Shawn Green
As for the rest, I fully agree.
Martijn Tonies
Database Workbench - development
Schalk <[EMAIL PROTECTED]> wrote on 02/23/2006 08:55:01 AM:
> George Law wrote:
> > Schalk ,
> >
> > You need to specify the unifying column between your ablb and abm
tables.
> >
> > ie - in your where, "and ablb.id=abm.id"
> >
> > Once you get this so it returns expected results, you can run the
George Law wrote:
Schalk ,
You need to specify the unifying column between your ablb and abm tables.
ie - in your where, "and ablb.id=abm.id"
Once you get this so it returns expected results, you can run the
query, prefaced with
"explain" and it will give you an idea on the way mysql is runni
Schalk ,
You need to specify the unifying column between your ablb and abm tables.
ie - in your where, "and ablb.id=abm.id"
Once you get this so it returns expected results, you can run the query,
prefaced with
"explain" and it will give you an idea on the way mysql is running the
query. Thi
Sheeri,
Thanks for the help. I tried your sample queries, but they dont really
return what I'm looking for. I think I've found a solution though.
Given the contents of a case, I'm looking for a unique case id, basicially I
want to search for a case if it exists once I've decided the configuration
You originally mention your UNION "doesn't work" but you did not
specify the query. This is a simple or query, or union. You can do
either:
select CaseType_idCaseType,Sizes_idsizes,qty from CaseType_has_Sizes
where (qty=1 and Sizes_idsizes=2) or (qty=1 and Sizes_idsizes=4);
or
select CaseType_
Sheeri,
The table I'm searching on has a composite primary key since it's mapping an
N:M relationship between Cases and Sizes.
Here's the create statement for the table I'm searching on:
DROP TABLE IF EXISTS `CaseType_has_Sizes`;
CREATE TABLE `CaseType_has_Sizes` (
`CaseType_idCaseType` int(10
Hi Conor,
The table you showed us has 2 primary keys, which is not possible.
Can you do a SHOW CREATE TABLE on *each* table?
-Sheeri
On 2/8/06, Conor McTernan <[EMAIL PROTECTED]> wrote:
> Hello, I'm having a hell of a time figuring this query out, maybe someone
> can point me in the right direc
Any suggestions?
On 2/3/06, سيد هادی راستگوی حقی <[EMAIL PROTECTED]> wrote:
>
> Dear all,
> Thanks for your replies.
>
> The main table for me is traffic_log. I use combination of recipient_id
> and mobile_retry fields to uniquely identify each row in the traffic_log and
> use the same combination
At 3:46 pm + 7/2/06, [EMAIL PROTECTED] wrote:
>Yes, you can do multi-way joins, and people often do. My biggest is 3-way, but
>some people do at least 5-way.
My record is and 8-way join (7 tables, one twice). So there! ;-)
>Beware that it is easy to specify operations which will heavily load
On Tue, February 7, 2006 10:46 am, [EMAIL PROTECTED] wrote:
> "David T. Ashley" <[EMAIL PROTECTED]> wrote on 07/02/2006 14:03:04:
>
>> a)Will MySQL allow joins that involve more than two tables (in my case,
>> perhaps as many as 5)?
>>
>> b)Can limits on a key field be included in the join in the s
"David T. Ashley" <[EMAIL PROTECTED]> wrote on 07/02/2006 14:03:04:
> Hi,
>
> I have several tables linked in various ways so that an inner join is
> possible. However, at the same time and in the same SQL query, I'd also
> like to query by some field values in one of the tables.
>
> Two quick
David T. Ashley wrote:
Hi,
I have several tables linked in various ways so that an inner join is
possible. However, at the same time and in the same SQL query, I'd also
like to query by some field values in one of the tables.
Two quick questions:
a)Will MySQL allow joins that involve more th
Dear all,
Thanks for your replies.
The main table for me is traffic_log. I use combination of recipient_id and
mobile_retry fields to uniquely identify each row in the traffic_log and use
the same combination on status_log as my foreign key to traffic_log.
Each message is saved as a row in traffic
Sorry, but you gave us a "best guess" situation. Your tables do not have
any PRIMARY KEYs defined on them so I had to guess at what made each row
in each table unique from all other rows in that table based only on your
sample query.
What value or combination of values will allow me to uniquel
Another question is that if I run such CREATE TEMPORARY statements in my
query, is MySQL really can do it fast?
Cause this query may be run periodically !
On 2/2/06, سيد هادی راستگوی حقی <[EMAIL PROTECTED]> wrote:
>
> Thanks for your suggestion,
> I forget to tell that each message in traffic_log
Thanks for your suggestion,
I forget to tell that each message in traffic_log may has at least 2 status
in status_log and I use to columns "recipients_id" and "mobile_retry"
to uniquely find each message's statuses.
May be I have to change my tables structure. I don't know.
It's really important f
سيد هادی راستگوی حقی <[EMAIL PROTECTED]> wrote on 02/01/2006
11:07:49 AM:
> Dear All,
> I need your suggestions please.
>
> have to large tables with these schemas:
>
> Table: traffic_log
> Create Table: CREATE TABLE `traffic_log` (
> `recipient_id` int(11) NOT NULL default '0',
> `retry`
401 - 500 of 1512 matches
Mail list logo