Migrating From Oracle To SQL Server 2000

  • Hi,

    I was converting some of the Procedures in a Oracle Package (written by someone whom I do not know ) to SQL Server Stored Procedures , I came across the following syntax..

    SELECT first_name

    FROM

    (Select Field1,Field2,Field3 from Table1)

    I am wondering if something like this is supported in SQL Server wherein we can supply the table names in the From Clause from an output of a SELECT STATEMENT?

     

    Thanks

     

    Prasad Bhogadi
    www.inforaise.com

  • Something like this ?

    use pubs

    go

    select

    au_fname

    from

    (select top 1

    *

    from

    authors) a

    au_fname

    --------------------

    Abraham

    (1 row(s) affected)

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply