On Sun, Dec 6, 2009 at 2:42 PM, Steve Edberg edb...@edberg-online.comwrote:
At 1:26 PM -0500 12/6/09, Victor Subervi wrote:
Hi;
I have the following:
mysql select * from categoriesProducts as c inner join
relationshipProducts
as r on c.ID = r.Child inner join categoriesProducts as p on
At 1:26 PM -0500 12/6/09, Victor Subervi wrote:
Hi;
I have the following:
mysql select * from categoriesProducts as c inner join relationshipProducts
as r on c.ID = r.Child inner join categoriesProducts as p on r.Parent = p.ID
where p.Category = prodCat2;
ERROR 1054 (42S22): Unknown column
Reni Fournier wrote:
Thanks for the solution. It looks like it would work, but I don't have
MySQL 4.1 (which I believe is required for this to work, since this is
SUBSELECT, isn't it?).
Assuming I have to use two selects, which would you say is faster,
creating a temporary table in MySQL,
René Fournier [EMAIL PROTECTED] wrote on 06/02/2005 02:53:51 PM:
I'm having a really hard time selecting rows from a table in one SELECT
statement. I can do it in two SELECTS, but it seems I should be able to
do it in one.
TRIPS
id date person_id cost
Hi René,
thsi can be a solution, many others are possible :
mysql select distinct the_date, person_id, cost, name
- from trips,persons
- where person_id=persons.id
- and the_date in(select max(the_date) from trips a
- where a.person_id=person_id
- group by person_id)
-
Thanks for the solution. It looks like it would work, but I don't have
MySQL 4.1 (which I believe is required for this to work, since this is
SUBSELECT, isn't it?).
Assuming I have to use two selects, which would you say is faster,
creating a temporary table in MySQL, or extracting the data
Are you spitting out an output of the query string to verify that the data
from the form is making it to the query correctly?
GOD BLESS AMERICA!
To God Be The Glory!
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
Hi Andy
What you can do is make a copy of your genre_titles table through
aliasing, this will allow you to only return the results that have both
genres and should reduce the need for programmatical sorting - aliasing also
makes for less typing :).
SELECT a.name, b.titleid
FROM titles a,
Dermot Frost wrote:
Hi all,
I have a table with the following data:
++---+--+
| lpcval | smiles_id | crhash |
++---+--+
| 0.81 | 996 |
Hi, Rachel,
It seems most people have missed this message.
Since you didn't give enough information in your question, in order to answer
your question, I need to make up some assumptions, which might or might not be
correct :-(
Suppose the same favsub could appear in either or both
Stefan Schulte [EMAIL PROTECTED] wrote:
i am analyzing a very strange behaviour of mysql-3.23-53-log
on a Suse 8.1 system:
I have created a table Customer with a column:
customer_id int(11)
Now i want to select all rows with customer_id=41:
SELECT * from Customer WHERE
Hi
Just try this
select distinct(a.id) from test a , test b where a.code = 23 and b.code = 45
and a.id = b.id
Regards,
-Arul
- Original Message -
From: Robert Gehrig [EMAIL PROTECTED]
To: MySQL List [EMAIL PROTECTED]
Sent: Wednesday, December 04, 2002 10:52 PM
Subject: Select Problem
Found solution, the right syntax is:
SELECT hl7incom.id
FROM hl7incom, pid_segment
LEFT JOIN pid_segment
ON hl7incom.id = pid_segment.id
WHERE hl7incom.msg LIKE '%PID%'
AND pid_segment.id IS NULL;
Cheers for try of help,
Karsten
Same result, also if I do not define unique index.
Just a
On Mon, 2002-09-30 at 23:44, Gebhardt, Karsten wrote:
I have two tables
CREATE TABLE pid_segment (
id INT NOT NULL UNIQUE PRIMARY KEY,
msg TEXT)
TYPE=INNODB
CREATE TABLE hl7incom(
id INT NOT NULL AUTO_INCREMENT UNIQUE PRIMARY KEY REFERENCES pid_segment
(id).
msg TEXT,
time TIMESTAMP
No way, I've already tried this.
I have two tables
CREATE TABLE pid_segment (
id INT NOT NULL UNIQUE PRIMARY KEY,
msg TEXT)
TYPE=INNODB
CREATE TABLE hl7incom(
id INT NOT NULL AUTO_INCREMENT UNIQUE PRIMARY KEY REFERENCES pid_segment
(id).
msg TEXT,
time TIMESTAMP NOT NULL)
.
-Original Message-
From: Gebhardt, Karsten [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 01, 2002 12:07 AM
To: '[EMAIL PROTECTED]'
Subject: RE: select problem with not equal syntax
No way, I've already tried this.
I have two tables
CREATE TABLE pid_segment (
id INT NOT NULL UNIQUE
Same result, also if I do not define unique index.
Just a suggestion:
SELECT hl7incom.id
FROM hl7incom, pid_segment
WHERE hl7incom.msg LIKE '%PID%'
AND not(pid_segment.id = hl7incom.id)
GROUP BY hl7incom.id;
Otherwise my only other suggestion would involve using the 'NOT IN'
logic, but I
select * from forms_data_recs
where fdr_form_id='37' and ( fdr_ff_id ='190' and ( fdr_value like
'%keith%' ))
OR ( fdr_ff_id = '192' and (fdr_value like '%public%' ))
order by fdr_date,fdr_id
-Original Message-
From: Keith Clay [mailto:[EMAIL PROTECTED]]
Sent: Friday, August 09, 2002
Hello!
This one should work:
SELECT
...
FROM
table1 t1
LEFT JOIN table2 t2 USING (code)
LEFT OUTER JOIN table3 t3 USING(code)
WHERE
t1.code = t3.code
OR t3.code IS NULL
;
Mark Colvin wrote:
I want to select from three tables where there may or may not be a record in
Hello!
This one should work:
SELECT
...
FROM
table1 t1
LEFT JOIN table2 t2 USING (code)
LEFT OUTER JOIN table3 t3 USING(code)
WHERE
t1.code = t3.code
OR t3.code IS NULL
;
Mark Colvin wrote:
I want to select from three tables where there may or may not be a record
Hi,
Use LEFT JOIN instead =
Bye and Good Luck!
--- Mark Colvin [EMAIL PROTECTED] wrote:
I want to select from three tables where there may
or may not be a record in
the third table. Table 1 and 2 have a one to one
relationship and table 1
and 2 both have a one to many relationship with
Hi,
I having trouble working out how to get a result set similar to the
following where I select from a table with Date Sales column.
My specific question is can I have a column that accumulates values,
if so could I have some guidance on how to express this in a select
statement please.
On Fri, 2 Mar 2001, Richard Vibert wrote:
Hi,
I having trouble working out how to get a result set similar to the
following where I select from a table with Date Sales column.
My specific question is can I have a column that accumulates values, if so
could I have some guidance on how
Hi,
At 01:52 pm 2/03/2001, Thalis A. Kalfigopoulos wrote:
On Fri, 2 Mar 2001, Richard Vibert wrote:
Hi,
I having trouble working out how to get a result set similar to the
following where I select from a table with Date Sales column.
My specific question is can I have a column that
Now that I notice more closely the numbers, my answer was obviously wrong with regard
to the 3rd column :o)
Very interesting question...but I doubt there is a SQL way to do that.
Looking fwd to what the rest will sugest.
cheers,
thalis
On Fri, 2 Mar 2001, Richard Vibert wrote:
Hi,
At
Can't you do something with SUM() to get the results, possibly in
coordination with GROUP BY?
--Nathan
On 2001.03.01 23:49:28 -0500 Thalis A. Kalfigopoulos wrote:
Now that I notice more closely the numbers, my answer was obviously wrong
with regard to the 3rd column :o)
Very interesting
On Fri, 2 Mar 2001, Nathan Clemons wrote:
Can't you do something with SUM() to get the results, possibly in
coordination with GROUP BY?
--Nathan
Not to my knowledge/imagination. What are you going to group by? You want and
incremental grouping or better you want a dynamic calculation
Try rebuilding the indexes.
-Original Message-
From: Alaiddin Tayeh [SMTP:[EMAIL PROTECTED]]
Sent: 15 February 2001 10:34
To: [EMAIL PROTECTED]
Subject: Select Problem
Linux , Apache, MySQL
I have a problem in my MySQL database, this is the senario:
I made an update
Sir, Joe Celko's 'SQL For Smarties' has two chapters devoted to tree
problems. After a quick look in the book, it appears to me that you
can use one of his algorithms if you restructure your table and adapt
his SQL to the MySQL dialect. See the chapter on Nested Set Models.
Bob Hall
Hi,
I
so you want to list all of them starting with the highest level and going
up to the lowest level?
On Mon, 29 Jan 2001, Oliver Joa wrote:
Hi,
I have a recursive Problem. I have a Table with columns "id", "name" and
"pid". E.g:
name1
name11
name12
name121
name122
name13
30 matches
Mail list logo