Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Declare cursor as a variable
Message
 
À
09/08/2005 12:42:19
Stephen Hunt
Admit Computer Services Inc.
Farmingdale, New York, États-Unis
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
01039571
Message ID:
01040040
Vues:
14
try this one mate

declare @query nvarchar(2000),@query2 nvarchar(2000)
set @query='select * from sysobjects'

set @query2='declare mycursor cursor for '+ @query

exec(@query2)
open mycursor
FETCH NEXT FROM mycursor
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform