Using import wizard to import data

  • I'm using the import wizard to import a txt file.. (all tasks, import data)

    I need to import this data into a pkey field named 'data_date'.

    My problem is I don't know how to send 'today's date' (data_date) to this field..

  • If the data_date field is indeed your Primary Key from what you've posted you have a problem.

    What if two records have the same datetime stamp?

    There are ways to work around this.

    Use a normal integer type Identity column for your primary key, and change the data_date field to have a default value of GETDATE() would solve that. Then you can just skip the field when importing and you'll be fine.



    --Mark Tassin
    MCITP - SQL Server DBA
    Proud member of the Anti-RBAR alliance.
    For help with Performance click this link[/url]
    For tips on how to post your problems[/url]

  • Thanks for answering...

    I should have explained better..there are three pkeys on this table..

    loanid

    data_date

    loan

    loanid is identity

    data_date - I need to insert

    loan - is coming from text file

    I was hoping there was a way to pass the current date to the 'data_date' field without using SSIS. Or at least using the import wizard to create the SSIS package for me.

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

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