Afficher un message
Vieux 15/09/2007, 08h35   #4
Erland Sommarskog
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: How would you... (binary info in a table)

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/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
  Réponse avec citation
 
Page generated in 0,05976 seconds with 9 queries