Reply to Re: Make a Bunch of Rows from a Table Resemble a Column

Your name:

Reply:


Posted by Tony Rogerson on 10/01/21 11:32

You could use a UDF and cursor, the UDF would be called on the SELECT clause
so all the up-front accessing would be efficient and just the resulting rows
would require the resulting slow UDF code.

Tony.

--
Tony Rogerson
SQL Server MVP
http://sqlserverfaq.com - free video tutorials


"laurenq uantrell" <laurenquantrell@hotmail.com> wrote in message
news:1132268951.082186.155340@g44g2000cwa.googlegroups.com...
> Currently I'm using a UDF and a physical temp table to accomplish this
> and I want to know if there's any way of doing it in a query or
> subquery instead...
>
> In TableA there are a bunch of rows:
>
> InvitationID (PK) PartyID Partygoer
> 1 1 Jim
> 2 20 Bob
> 3 2 Frank
> 4 1 Robert
> 5 1 Pete
>
> In TableB are rows:
> PartyID (PK) PartyDate PartyName
> 1 1/1/2000 WildParty
> 2 1/1/2000 BoringParty
>
> When a user runs a query to search for all parties on 1/1/2000 I want
> the result to look like:
>
> PartyID PartyDate PartyName Partygoer
> 1 1/1/2000 WildParty Jim, Robert, Pete
> 2 1/1/2000 BoringParty Frank
>
>
> I'm hoping there's a solution to this.
> Thanks,
> lq
>

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация