Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Select Statement

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-08-07 : 09:33:26
Mala writes "I have to accomplish the following task in a single query.

My table contents are as below: [after joining two tables I get result as below]

Name	Type       Details

ABC PM Disk
PCB PM Floppy
PCB TM Floppy
XYZ PM Phone
XYZ FN Phone
ZZZ FT Paper


Now I want to get result as below.


Name	Type       Details

ABC PM Disk
PCB PM Floppy
XYZ PM Phone
ZZZ FT Paper


i.e. If Type PM exists in database for any particular name, then ‘TM’, ‘FN’ or any other record should not be displayed. Otherwise I should display that details. Here for both the tables, only Name is link. No other common values are there. An u tell me how can I get result in a single query.



"
   

- Advertisement -