Posted by Pugi! on 11/02/05 19:38
"J.O. Aho" <user@example.net> schreef in bericht
news:3ssbbuFppjkrU1@individual.net...
> Pugi! wrote:
>> "J.O. Aho" <user@example.net> schreef in bericht
>> news:3ss896Fpjj4pU1@individual.net...
>>> Pugi! wrote:
>>>> I have problem with sql statement.
>>>> I have made a address-database, problem is concerning getting
>>>> information
>>>> out of it.
>>>> Because for not everyone in my address-db I have all that information I
>>>> created the table lnk_ent_comm
>>>> When I query database for a certain entity I get all the types of how
>>>> to
>>>> communicate with him/her/it that are available. But I would also like
>>>> to
>>>> see
>>>> the types/means of communication that are missing for which there is no
>>>> entry in table lnk_ent_comm
>>>> I tried a left join from table communication on lnk_ent_comm, but that
>>>> doesn't work.
>>>
>>>
>>> Join your communication table to the lnk_ent_comm table and search for
>>> the
>>> user id_entity and where lnk_ent_comm.value is NULL.
>>
>> How do u do that? Could u give example ? Remember there are no null
>> values
>> in lnk_ent_comm.
>
> SELECT * FROM communication LEFT JOIN lnk_ent_comm ON
> communication.id = lnk_ent_comm.id_communication WHERE
> lnk_ent_comm.id_entity
> = 54 AND lnk_ent_comm IS NULL
>
>
> //Aho
If I run it as above I get error : #1054 - Unknown column 'lnk_ent_comm' in
'where clause'.
If I add a valid columname like value : query returns nothing.
Pugi!
Navigation:
[Reply to this message]
|