SQL TASK - MAX(Value) -bind to a variable

  • I set up a connection to ODBC Data Provider. And I'm running a simple query to return maximum IDs for one column. There is no problem to achieve that.

    How can i bind at one time diffrent variables with different max values

    Could anyone help with this issue? Thanks!

    [font="Comic Sans MS"]
    ---------------------------------------------------

    Thanks [/font]

  • Hi there, well first you should set your sql execute task ResultSet property to "Single Row" if you are getting only a row back like the max query you mentioned. Then you have to map the parameters you are getting back. So for this you have to define your variables that will hold your data, I was trying with some different types but I guess the easier way to do it is just to set them as objects variables, and then you could cast them into whatever you want to. Then you do the actual mapping in the Result Set view you have on the left. You put your result set name ( the name of the column you are getting back or the possition of it like column one is 0 ) and your Variables' names.

    hhhmmmm I guess that would be it 😀

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

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