|
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]
|