import data without creating table?

  • Ok so this may be a dumb question, but i have soem data in a 3rd party database which i would like to import into sql server. its from some old billing system our company used to use. the problem is that the table has over 1000 columns. obviously that woudl take forever to manually create the table in enterprise manager. is there some simple way to just have a table created and have the data dumped in without having to manually create it?

    like i woudl love to even dump the old data to excel but it is too big.

  • the import wizard will easily help you connect to an excel spreadsheet or any other data source, and automatically create a table with the same column names the excel spreadsheet /other datasource has, defaulting to "col001" thru "col9999" when no name is provided....you can edit the table that gets created later if need be.

    Right click on your database...Tasks....Import Data

    does that help?

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • hey thanks for the info but i don't seem to have that option.

    if i right click and go to tasks, all i have is Detach, Shrink, Backup, Restore, and Generate Scripts.

  • sounds like you only have the SQLExpress version and not Developer or full versions like Standard or Enterprise.

    In that case, you can make a linked server, and then do a SELECT * INTO MYNEWTABLE FROM LINKEDSERVER...TABLENAME

    that willc reate a new local table "on the fly" based ont he other data.

    what specific data source are you connecting to, so I can give you an example script for a linked server syntax. raw text? access? excel? some other source like oracle or MYSQL?

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • the other datasource is some other obscure 3rd party database. not sure what exactly it is - i will find out this afternoon when i meet with my boss.

    and how do i go about gettign the correct version of sql manager? is it available for download somewhere or do i need to talk to my network admin or DBA?

  • Do you have an installation of SQL Server as a server somewhere?

  • yea we are a large company - the network/DB guys have a sql cluster set up in the server room. that's what i am accessing with my current version of sql manager. its a sql server 2005 server. I do have the old enterprise manager installed on my system and can still hit it with that. but i usually use the sql server management studio.

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

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