You are here: Re: Stuck with sorting columns « MsSQL Server « IT news, forums, messages
Re: Stuck with sorting columns

Posted by Erland Sommarskog on 10/02/96 11:35

(wgerrard@gmail.com) writes:
> Where
> documentname is the name of the document
> clientguid is the unique identifier for my patient
> docguid is the unique id for the document
> displayname is the dataitem (e.g. diagnosis)
> valuetext is the "answer" (e.g. kidney failure)
> valuenum is used instead if the valuetext is an integer (e.g.
> number of toes)
>
> I am trying to split/change this table so that I have a different table
> per document, with one row per patient occurance with the displaynames
> as columns.
>
> I have been using the following but it is slow and for large tables
> takes hours (literally) to run:-

I will have to admit that I don't really understand what the result
is to be. Could you post some sample data (preferrably as INSERT
statements), and the desired result?



--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

 

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

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