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)
 problem with select of a select

Author  Topic 

zubair
Yak Posting Veteran

67 Posts

Posted - 2004-03-15 : 10:41:01
i get an error doing this:

select * from (
select [name] from ftpdestination
where portnumber = 21
)
where [name] = 'tm print'

what am i doing wrong? any help appreciated. thanks

ehorn
Master Smack Fu Yak Hacker

1632 Posts

Posted - 2004-03-15 : 10:45:05
A derived table must have an alias:

select d.*
from
(
select <columns>
from <table>
) d
Go to Top of Page

zubair
Yak Posting Veteran

67 Posts

Posted - 2004-03-15 : 10:50:09
thanks that did the trick!
Go to Top of Page
   

- Advertisement -