• Matt Whitfield (9/29/2009)


    with SET FMTONLY, it doesn't do any data changes, just gives you the schema of the result. So passing in any old default value for the parameters will be fine.

    Run a profiler trace - willing to bet that's what it does 😀

    I answered a similar question a year or so ago with the concept of using SET FMTONLY ON. You are correct that it doesn't actually change any data and it seemed like an ideal solution.

    The problem we kept running into is how you take that "empty" result set that you get with FMTONLY and do anything with it. That's the point I was stuck at with actually using this for anything. How do you turn that information into a physical list of columns that you can do something with?

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]