View Single Post

   
  #4 (permalink)  
Old 02-29-2008, 03:57 AM
Bill MacLean
 
Posts: n/a
Default Re: 1:m database relation "Flattened" for reporting purposes

Thank you both Erland and Anith for the help. I really like method #4 on
the post that Anith linked. That method uses a table-valued function that
does not even use a cursor! The method appears to work great on the sample
Northwind database. I will adapt the idea to the dev environment for the
project here at work, and see how it scales.

I really like the idea of sparing the developers all the client side work,
so that function seems pretty neat. I'm still trying to figure out
exactly how it works, but I like the results.

Of course, I wish the concatenated output weren't necessary in the first
place, this appears to be a nice solution.

Thanks,

Bill


"Anith Sen" <anith@bizdatasolutions.com> wrote in message
news:y6frc.3236$Tn6.519@newsread1.news.pas.earthli nk.net...
> You cannot do this directly. t-SQL resultsets returns tables with rows
> having column, with each column representing a single value. So you will
> have to hack up some kludge to get this done from the Server. Some such
> ideas can be found at:
>

http://groups.google.com/groups?selm...GP09.phx.g bl
>
> A more reliable approach is to return the resultset to the client
> application & format or concatenate the way you want.
>
> --
> Anith
>
>



Reply With Quote