CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> IDE/GUI

 SQL syntax question

Print topic Send  topic

Author Message
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
View profile  Send private message
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
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.