You are here: Re: displaying a table « MsSQL Server « IT news, forums, messages
Re: displaying a table

Posted by Simon Hayes on 05/27/05 20:15

<chudson007@hotmail.com> wrote in message
news:1117191730.138398.189500@f14g2000cwb.googlegroups.com...
I'm not sure how to go about this and need some help.
I've got a data extract rather than a properly structure table in SQL.
It looks something like below:

Name: Item:
John Ball
John Racket
Paul Ball
Jim Glove
Jim Ball

What sort of script can I run that will return each name once and then
the Items in as many columns needed to list them all?
I.e. so that it will look like
Name: Item1 Item2
John Ball Racket
Paul Ball
Jim Glove Ball


Regards,
Ciarαn


The short answer is that this is usually much easier to do in the front end
than in the database; for the long answer, Google for "dynamic crosstab
queries", and also see this KB article:

http://support.microsoft.com/default.aspx?scid=kb;en-us;175574

Simon

 

Navigation:

[Reply to this 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

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация