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
 Transact-SQL (2000)
 urgent , need to build a sql query

Author  Topic 

rajiv_software
Starting Member

2 Posts

Posted - 2005-04-01 : 08:57:36
Hi All ,

as per our telephonic discussion , i need to craete a query -

as per following requirement .


there is two table
1) spocemployee

fields type lengh

employeeid varchar 10
team varchar 50


2) employee

fields type lengh

employee id varchar 10
firstname varchar 30
lastname varchar 30
team varchar 50


what i need to do is ---

(1) I HAVE TO DISPLAY ALL THE EMPLOYEEID ,FIRSTNAME,LASTNAME,TEAM NOT IN
SPOCEMPLOYEE TABLE BUT ARE AVAILABLE IN EMPLOYEE TABLE


ARE YOU GETTING ME . IF YES THEN PLEASE MAKE A QUERY TO DO SO ,

FOR ANY OTHER EXPLANATION PLEASE REPLY ME .

RGDS

RAJIV

cshah1
Constraint Violating Yak Guru

347 Posts

Posted - 2005-04-01 : 09:15:21
First of all be POLITE

SELECT E.employeeid, E.firstname, E.lastname, E.team
FROM employee E
WHERE E.Employeeid NOT IN (Select S.EmployeeID From spocEmployee S WHERE S.EmployeeID = E.Employeeid)

Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-04-01 : 09:16:06

Select * from Employee where EmploeeId not in(select employeeid from spocemployee)

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

rajiv_software
Starting Member

2 Posts

Posted - 2005-04-02 : 01:03:36
thanx dear






quote:
Originally posted by madhivanan


Select * from Employee where EmploeeId not in(select employeeid from spocemployee)

Madhivanan

Failing to plan is Planning to fail

Go to Top of Page

rockmoose
SQL Natt Alfen

3279 Posts

Posted - 2005-04-02 : 03:19:24
>> as per our telephonic discussion
You mean telepathic

rockmoose
Go to Top of Page
   

- Advertisement -