nhbw19t
Posts: 29
|
Posted: 11/09/2005, 4:55 PM |
|
I have two tables that contain device lists. One table contains all the critical devices. The other table contains devices with comments. I am trying to retreive the list of devices without comments in a grid. I have tried the right and left joins and do not get the results I am expecting.
Here is the sql that the gui created:
SELECT devname, name
FROM devcriticaldailylist INNER JOIN devcritical ON
devcriticaldailylist.name <> devcritical.devname;
This returns the total list with comments. I need the devices without comments - the devices listed in the daily table. Anyone have an idea?
_________________
J.D. Archer
GE Transportation |
|
|
DonB
|
Posted: 11/11/2005, 10:13 AM |
|
A better description of the tables and what 'comments' are would be
necessary to give an answer.
--
DonB
http://www.gotodon.com/ccbth
"nhbw19t" <nhbw19t@forum.codecharge> wrote in message
news:443729a6cb7f50@news.codecharge.com...
> I have two tables that contain device lists. One table contains all the
> critical devices. The other table contains devices with comments. I am
trying
> to retreive the list of devices without comments in a grid. I have tried
the
> right and left joins and do not get the results I am expecting.
>
> Here is the sql that the gui created:
>
> SELECT devname, name
> FROM devcriticaldailylist INNER JOIN devcritical ON
> devcriticaldailylist.name <> devcritical.devname;
>
> This returns the total list with comments. I need the devices without
comments
> - the devices listed in the daily table. Anyone have an idea?
> _________________
> J.D. Archer
> GE Transportation
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
Edd
Posts: 547
|
Posted: 11/20/2005, 10:10 PM |
|
Try
SELECT devname, name
FROM devcritical
LEFT JOIN devcriticaldailylist ON devcriticaldailylist.name = devcritical.devname
WHERE devcriticaldailylist.name Is Null;
Edd
_________________
Accepting and instigating change are life's challenges.
http://www.syntech.com.au |
|
|
|