Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display only one

Status
Not open for further replies.

shaleen7

MIS
Jun 23, 2002
188
US
I'm tryiing to exclude cases where a certain criteria
only exists.

For example:
Each application has several cases in it.
Application number: APP100 contains the following cases:
State Type
NY PCT
NJ PSP
PA NP

OR
Application number: APP101 contains the following:
State Type
MI PSP
PA NP

OR

Application number: APP102 contains the following:
State Type
CA PSP

I need to come up with a query where I exclude an application number where a PSP case only exists within the application number. Like APP102 shown above.

Here is my select statement:
SELECT Tableapp,Tabletype
FROM Tableapp, Tabletype,tablepatents
WHERE Tableapp.ideapp= tablepatents.ideapp and Tabletype.idetyp = tablepatents.idetyp
AND Tabletype.CODTYP = 'PSP'

Any suggestions?
 
Shaleen,

Yes, we can certainly create a working solution for you. Since I'm a bit cramped on time this morning, could you please post the following to speed things along:

1) CREATE TABLE...statements for your three tables.
2) INSERT...statements into those tables to create enough data to test/exercise the code.

As soon as you post the code, I'll set about creating solution code for you.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA @ 16:52 (25Jun04) UTC (aka "GMT" and "Zulu"), 09:52 (25Jun04) Mountain Time)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top