• dob111283 (6/17/2013)


    Ok Sean, I will do the TVF. But it leads me back to square one sort of, because I can't query the ClearedTransaction stored procedure, the one you gave an example of as "SomeTable". So how would I be able to do that. Also Sean, assuming I get that to work, is it possible to create that function you and I were discussing and putting it into a Stored Procedure? If so, is there any benefit to that?

    What is this ClearedTransaction stored proc? Is it really involved? I would think it really nothing more than a select statement? Maybe you could make your iTVF as GetClearedTransactions. Then modify the ClearedTransaction stored proc and have it select from your new function? That way the legacy code will still work and you don't have two copies of the same logic.

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/