You are here: Re: Problem with Updatetext in SQL 2000 trying to concatenate multiple text fields « MsSQL Server « IT news, forums, messages
Re: Problem with Updatetext in SQL 2000 trying to concatenate multiple text fields

Posted by Erland Sommarskog on 01/02/07 22:33

Dan (dan_barber2003@hotmail.com) writes:
> select
> @profileid = min([id]),
> @ptr1 = MIN(textptr(text1))
> from #holding
> where [id] > @profileid

This does not look good. Is there are any reason to assume that text
pointers are aligned with id?

Either do

SELECT @profileid = MIN(id)
FROM #holding
WHERE id > @profileid

SELECT @ptr1 = textptr(text1) FROM #holding WHERE id = @profileid

Or run a second cursor over #holding.

And, yeah, this is ugly, painful and no fun at all. But it's the only
alternative.

In SQL 2005 there are new data types that replaces text & co, and
which does not have all the restrictions of text. Or the need to
use UPDATETEXT...


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

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