t; Geschäftsführer: Dr. Bernd Reifenhäuser, Dr. Alexander Ebbes
> Handelsregister: HRB 6870 - Amtsgericht Mainz
>
>
>
>
> -Ursprüngliche Nachricht-
> Von: Olivier Nicole [mailto:olivier.nic...@cs.ait.ac.th]
> Gesendet: Mittwoch, 29. April 2015 07:21
> An: mog...@fumlersoft.d
Lucio,
>> I have a table where each record is made of one item_number and one
>> data_value.
> You do not have any other column ? In particular you do not have any
> unique key record identifier ? All my tables have a column with a record
> sequence number "seq int NOT NULL AUTO_INCREMENT" whic
Thank you,
> SELECT * FROM test
> WHERE item_number in (SELECT item_number FROM test where data_value=1)
> AND item_number not in (SELECT item_number FROM test where data_value = 2);
That did it.
Olivier
> On Wed, April 29, 2015 07:20, Olivier Nicole wrote:
>>> SELECT * FROM table WHERE item_
On Wed, 29 Apr 2015, Olivier Nicole wrote:
I have a table where each record is made of one item_number and one
data_value.
You do not have any other column ? In particular you do not have any
unique key record identifier ? All my tables have a column with a record
sequence number "seq int NO
Nicole [mailto:olivier.nic...@cs.ait.ac.th]
Gesendet: Mittwoch, 29. April 2015 07:21
An: mog...@fumlersoft.dk
Cc: mysql@lists.mysql.com
Betreff: Re: Select one valuebut not the other
> SELECT * FROM table WHERE item_number=1;
Sorry if my question was not clear: what I am looking for is:
SELECT * FROM ta
Right,
Take a look at this one then:
insert into test(item_number,data_value)
values(1,1),(1,2),(1,3)
,(2,1),(2,3)
,(3,1),(3,2),(3,3)
,(4,1),(4,3);
SELECT * FROM test
WHERE item_number in (SELECT item_number FROM test where data_value=1)
AND item_number not in (SELECT item_number FROM test where
> SELECT * FROM table WHERE item_number=1;
Sorry if my question was not clear: what I am looking for is:
SELECT * FROM table WHERE data_value=1 AND "there is not any reccord with
the same item_number and data_value=2"
Olivier
>
> On Wed, April 29, 2015 06:30, Olivier Nicole wrote:
>> Hi,
>>
>>
SELECT * FROM table WHERE item_number=1;
On Wed, April 29, 2015 06:30, Olivier Nicole wrote:
> Hi,
>
> I am sure that it is feasible with MySQl, and I am sure that's a newbie
> question, but my SQL skills are limited...
>
> I have a table where each record is made of one item_number and one
> data
Hi,
I am sure that it is feasible with MySQl, and I am sure that's a newbie
question, but my SQL skills are limited...
I have a table where each record is made of one item_number and one
data_value.
If one item has several values, there are several records with the same
item_number and a differe