Home Forums SQL Server 2005 Development Is it possible to simulate the cross apply function? RE: Is it possible to simulate the cross apply function?

  • vwilliams (3/23/2009)


    It is taking parameters from an application and getting information to display to an aspx report. The problem is one of the fields (phra_request_querystring) is a string that has to be broken up into several fields to populate the columns within the report, delimited by '&'. The field can vary in content. The column names are included in the string. So it has to also parse the results to get the column name and the value.

    A 2 dimensional "array" like that is a virtual piece of cake... please read the following article... there is no need for CROSS APPLY nor even the overhead of a UDF...

    http://www.sqlservercentral.com/articles/T-SQL/63003/

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)