Forum Replies Created

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

  • RE: Pass file name as variable

    Thank you so much for your suggestions. It worked. Here is what I did:

    CREATE TABLE #temp(

    col1 char(50) NOT NULL,

    col2 bigint NOT NULL,

    col3 char(100) NULL,

    col4 char(100) NULL,

    col5 char(3000) NULL,

    col6 datetime NULL,

    col7...

  • RE: Importing CSV files without knowing destination schema

    Hi,

    Thank you for the above script, I used the above script and it worked just fine. My question is for the part:

    --===== Query one of the files by using a...

  • RE: Pass file name as variable

    Oops sorry for the confusion. My question is lets say if the file in C:\Misc changes from File1.txt to File8.txt, how can my code dynamically capture the file change and...

  • RE: Pass file name as variable

    Yup, I got this from this forum:

    declare @filename char(40);

    set @filename = 'File1.txt'

    declare @dir char(30);

    set @dir = 'C:\Misc';

    set @openrow1 = 'Driver={Microsoft Text Driver (*.txt; *.csv)}; DefaultDir=' + @dir + ';';

    set @openrow2...

  • RE: Pass file name as variable

    Hi,

    I am trying to load text files from C:\Misc to a table in sql server 2005 using openrowset using schema.ini file. I can do this by manually changing the file...

  • RE: Loading text file to SQL Server 2005 using bulk insert

    This is extremely helpful. One question: is there a way to populate the file name in the schema.ini file using a like statement. For example, I want to say "pick...

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