small import issue

  • i have a file c:\\abc.txt

    in which i have some data so i jus need to import data from that file to db so i jus used import export wizard but here the problem is that i need to get a new column naming "source file" with the c:\\abc.txt as data in that column for the whole data ....i have some other files c:\\abc1.txt which i should import to the same table now i should get c:\\abc1.txt for the data in the column 'source file" for eg

    name id sourcefile

    abc 1 abc.txt

    abcs 2 abc.txt

    agh 3 abc.txt---imported from file abc.txt

    hdsj 4 abc.txt

    ancb 5 abc1.txt

    ahdhd 6 abc1.txt--imported from fil abc1.txt

    adshd 7 abc1.txt

    deg 8 abc2.txt--imported from fil abc2.txt

    sah 9 abc2.txt

    asaj 10 abc2.txt

    so i shouls have all this data in a single table but i need to add a new column with the column data to be changed according from which file it has come from ...other than ssis how can i do that in ssms..

    can i manually type the sourcefile name in the import at first..if so how can i do that please let me know its urgent thkz in adavance.....

    Thanks,
    Chinna

    Its the Journey which gives you Happiness not the Destination-- Dan Millman

  • I posted a TSQL solution at the other link.

    http://www.sqlservercentral.com/Forums/Topic464002-338-1.aspx?Update=1

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

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