Reply to Re: How would you... (binary info in a table)

Your name:

Reply:


Posted by Erland Sommarskog on 09/15/07 07:35

James Fraser (jbf1@concentric.net) writes:
> But maybe I didn't think ahead far enough:
> How can I run this SP or UDF on all of the rows in my original table.
>
> I want the functionality of something like this:
> SELECT * FROM my_fn ( inputtable.row1binaryfield)
> UNION
> SELECT * FROM my_fn (inputtable.row2binaryfield)
> .
> .
> UNION
> SELECT * FROM my_fn( inputtable.rowlastbinaryfield)
>
> where the binary inputs are coming from the original table in the db.
> I'm on SQL 2000, BTW. Right now, I have the feeling that a cursor is
> the way out of this.

Yes, on SQL 2000 you are stuck with a cursor. SQL 2005 offers the APPLY
operator to address this.


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

[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

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