Help required urgent please

  • Hi my boss has asked me to import a data from a excel sheet to a table in sqlserver .

    the exact task given by him is as follows:

    He wants me to back up the current table and delete all rows from the table and import the data from the excel file to the table and validate it.

     

    My questions are :

    1..How to back up a single table in a database?

    2..How to import the data from the excel sheet into the sqlserver table?

     

    We are using sqlserver 2005

     

    Ihave to finish this task as early as possible can any body help me with this?

     

    Please its really urgent

    Thanks in advance

     

    Pavan Posani

     

     

     

     

     

  • my god,

    1..How to back up a single table in a database?

    simple way: select * into temptable from whatevertablename

    2..How to import the data from the excel sheet into the sqlserver table?

    use import / export function, it exists in 2000/2005 and many other DB

  • Short and sweet...

    Make new DB

    SELECT * INTO NewDB.dbo.TblName FROM dbo.CurrentTbl

    Backup new databse

    Backup currentdb

    DELETE dbo.CurrentTbl

    Import

  • Based on your questions, confirm that you have the table (and DATA) well backed up before you do any deleting or truncating.

Viewing 4 posts - 1 through 3 (of 3 total)

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