Forum Replies Created

Viewing 12 posts - 16 through 27 (of 27 total)

  • RE: If column exists?

    Exactly! 😉

    Thanks, I'll try this out.

  • RE: If column exists?

    So, that's why I was trying to see if an "if exists" or "where exists" or is not null, or some such variation would work.

    Basically, check for the expected columns...

  • RE: If column exists?

    So, when I run this:

    DECLARE @strColNames VarChar(500)

    SELECT * INTO Project01PreTemp

    FROM OpenRowSet('MSDASQL', 'Driver={Microsoft dBASE Driver (*.dbf)};

    DriverID=277;

    DBQ=C:\ReturnedProjects',

    'SELECT * FROM Proj01')

    --DECLARE @strColNames VarChar(500)

    SELECT @strColNames = isnull(@strColNames +', ', '')

    + name FROM...

  • RE: If column exists?

    The dbf file has different columns than the SQL table.

    Let's see if I can clarify.

    dbf file has the same columns (for example) of

    FIRSTNAME, LASTNAME, HOMEPHONE, CELLPHONE, etc.

    Sometimes, some non-required...

  • RE: If column exists?

    I'll see if I can do that. Meanwhile, I have no trouble importing the file with all it's columns to a temporary table. But how do I do an insert...

  • RE: If column exists?

    Sorry, but some times, when I posted in other forum categories that were more relevant to the question, I received ZERO responses, but actually received some responses to the same...

  • RE: DTS with variable filenames and variable columns?

    So, I can get this code to work:

    SELECT *

    INTO Project01tmp

    FROM OpenRowSet{'MSDASQL', 'Driver=(Microsoft dBASE Driver (*.dbf(};DriverID=277;DBQ=C:\ProjectDir', 'select * from Proj01');

    INSERT INTO Project01tmp

    (FirstName, LastName, ....)

    But again, I'm having to specify the filename....

  • RE: DTS with variable filenames and variable columns?

    What should I look for in BOL for the Driver details information?

    Thanks.

  • RE: DTS with variable filenames and variable columns?

    I see in the DTS package tool, with the "File Transfer Protocol" I can choose the source to be either Internet or Directory. So I choose Directory. Then it lists...

  • RE: DTS with variable filenames and variable columns?

    So what is this fso you're referring to? ?File System Object?

    I'm NOT an activeX developer at all. In fact, the hope is that eventually they will migrate off this ms...

  • RE: DTS with variable filenames and variable columns?

    I'll try fiddling around with that then. I was hoping I could do things in a more SQL related way, but if DTS can be made to do it correctly,...

  • RE: DTS with variable filenames and variable columns?

    I'd PREFER to do it all in sql rather than dts, but I can't seem to get it to correctly handle the file format.

    What is the driver information/code/syntax I would...

Viewing 12 posts - 16 through 27 (of 27 total)