Anything like Oracle's "Create Table As Select"?

  • Is there anything similar to Oracle's create table as select statement in SqlServer 2000?

    ex.

    create table dimension as

    select a.division

    b.department_name

    c.employee_name

    from division a,

    department b,

    employees c,

    where c.department_fkey = b.department_key

    and b.division_fkey = a.division_key

  • This will work ok, but to select into a permanent table, execute sp_dboption to turn on the select into/bulkcopy option before executing the SELECT statement. :

    SELECT a.division

    b.department_name

    c.employee_name into dimension

    from division a,

    department b,

    employees c,

    where c.department_fkey = b.department_key

    and b.division_fkey = a.division_key

    Paul Ibison

    Paul.Ibison@btinternet.com


    Paul Ibison
    Paul.Ibison@replicationanswers.com

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

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