SQL server dynamic select for insert to Oracle

  • Migrating a SQL server legacy application database to Oracle. many years in oracle havent worked ith SQL before.

    I only want certain columns and tables and my want to format some columns as well, can I generate oracle insert scripts from SQL? Is there a spool out function like SQLplus? ie, log in to sql server, spool a file and run something like the following pseudo code...

    spool my_ora_insert.out

    select "insert into my_ora_table ( my_ora_column1, my_ora_column2) values '" || my_sql_col1 || ",", my_sql_col2 || ");"

    from my_SQL_table

    spool off

    so I can then run that sql file straight into my oracle database

  • Open Management Studio, New Query...

    use your_database

    go

    execute your query

    Right-click on result grid... Save as

    _____________________________________
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at Amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

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

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