The reason ur getting empty result set is becuase both tables have
raw_mat_id (1,2).
Insert a new record into raw_materials and not into raw_materials_product,
then you would get the missing record.
On 12/3/08, Nigel Peck <[EMAIL PROTECTED]> wrote:
>
> Nigel Peck wrote:
>
>> Ananda Kumar wrote:
>
Nigel Peck wrote:
Sorry, make that:
SELECT `Raw_materials`.`raw_mat_id`, `Raw_materials`.`name`
FROM
`Raw_materials`
LEFT JOIN
`Raw_materials__Products`
ON
`Raw_materials`.`raw_mat_id` =
`Raw_materials__Products`.`raw_mat_id`
WHERE
Nigel Peck wrote:
Ananda Kumar wrote:
did u try this
select * from raw_materials where raw_mat_id not in (select
raw_mat_id from
raw_materials__Products);
Hi Ananda,
Thanks for this, I'm really looking to do this in a single SELECT, for
efficiency. I'm sure it's possible with a join but j
Ananda Kumar wrote:
did u try this
select * from raw_materials where raw_mat_id not in (select raw_mat_id from
raw_materials__Products);
Hi Ananda,
Thanks for this, I'm really looking to do this in a single SELECT, for
efficiency. I'm sure it's possible with a join but just not sure how.
I'
did u try this
select * from raw_materials where raw_mat_id not in (select raw_mat_id from
raw_materials__Products);
On 12/3/08, Nigel Peck <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> I'm having trouble figuring out how to construct a query and am hoping
> someone can help...
>
> I have three ta
Hi all,
I'm having trouble figuring out how to construct a query and am hoping someone
can help...
I have three tables:
Raw_materials
+++---+
| raw_mat_id | name | count |
+++---+
| 1 |