Execute Sql Task in SSIS

  • Insert into hs(Id, Date, time)

    select utid,date,time

    from time t

    where transactiontime between ? and ?

    I have created the varibles startdate and enddate as datetime

    Sourcetype as directinput and resultset to none

    When I execute the sql task I get the error as

    "Syntax error, permission violation, or other nonspecific error". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

  • Sachin4all (6/21/2011)


    Insert into hs(Id, Date, time)

    select utid,date,time

    from time t

    where transactiontime between ? and ?

    I have created the varibles startdate and enddate as datetime

    Sourcetype as directinput and resultset to none

    When I execute the sql task I get the error as

    "Syntax error, permission violation, or other nonspecific error". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

    To narrow it down, try hard-coding the entire SQL insert and running again. If it succeeds, you'll know to focus attention on the parameters.

    The absence of evidence is not evidence of absence.
    Martin Rees

    You can lead a horse to water, but a pencil must be lead.
    Stan Laurel

  • How many records are you typically going to be inserting? If its a lot I wouldn't do this in an EXEC SQL task but a Data-Flow task.

    CEWII

  • There are a lot but thats fine......

    The thing is i am unable to map the parameters correctly

  • @phil

    If i remove the ? and hardcode the task...

    Its working perfectly

  • Try datatype DATE instead of DBTimestamp


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

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

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