• dan-572483 (3/21/2014)


    I'm working in SSIS 2012 and I'm trying to use a query in an Excel Source to bring in only the data I want to use. My query is

    SELECT F1, F2, F3, F4, F5, F6, F7, F8 From [SheetName$] WHERE F1 > '1/1/2014' and F4 > 0

    In this case, F1 is data type date[DT_DATE] and F4 is currency [DT_CY].

    I getting a type mismatch error that seems to be in the date column because is I remove it I am able to preview data. Is it possible to use an Excel file as a source and query by date range?

    You can save yourself from a lot of pain by just reading in all of the data (maybe keep F4 > 0) and filter out unwanted rows with a conditional split. It will be easier to implement.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP