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)
 Inline views

Author  Topic 

scelamko
Constraint Violating Yak Guru

309 Posts

Posted - 2007-08-15 : 10:05:02
Hi,

I have three tables employee, department and person. I do a inner join on employee and department tables to get the relavent information. I want to get ssn# from person table only if it is stored in the table - I do left outer join on person table. Since each of the tables have 2 million rows, I am wondering if I can eliminate left outer join and use an inline view in the query.

select e.empname, d.departmentname, p.ssn, p.dob
from employee e inner join department d
on e.emp_id = d.emp_id
left outer join person p on p.emp_id = e.emp_id

On general terms what is the advantage and purpose of using inline view.

Any suggestions and inputs would help.

Thanks

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-08-15 : 10:07:37
Inline View ? What's that ?


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2007-08-15 : 10:33:38
Do you mean a derived table?


Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page
   

- Advertisement -