Pulling information out of Unix

  • Hello,

    I am trying to pull data out of unix through a ODBC connection. The SSIS package abends with a 0x80131937 which tells me that the sql is wrong somehow.

    The main driver of the SQL is:

    Select *

    from Accums

    where Year => '2009'

    But in testing through .net IDE odbc connection I found that Year column is the problem.

    I run

    SELECT Punbr, Grnbr, ESSN, SEQ, Policy, "Year"

    FROM accums

    The quotes is put in by the .net IDE. I remove them, IDE puts them back in.

    So, How can I fix the SSIS to pull year properly?

    Any advice would be appreciated.

    Thank you,

    PN

  • Use quoted year like "Year" in your SQL statement, too. Probably Year is keyword in the specific SQL dialect you use and the quotes will help the database engine handle the column name properly.

    ---
    SSIS Tasks Components Scripts Services | http://www.cozyroc.com/

  • try brackets [Year]. Also never do SELECT * never ever ever. either use a view that lists all of the fields but never use *. I bet you spent a few hours trying to figure out what that error was.

  • I tried [Year] and it didn't work. I did get it to work. I put in 'Year' and it went through. For some reason it would not work originally but now it does. I wonder if a flag behind the scene got flipped. But it works.

    I also took out the * l8r after it worked. I now only select the fields needed.

    Thanks for all the help.

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

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