Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Declare cursor as a variable
Message
De
09/08/2005 12:42:19
Stephen Hunt
Admit Computer Services Inc.
Farmingdale, New York, États-Unis
 
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Declare cursor as a variable
Divers
Thread ID:
01039571
Message ID:
01039571
Vues:
65
I am trying to build my select statement into a variable
declare @query varchar(8000)
set @query='select * from filename'
when I try to execute my declare cursor
declare cursor for @query
I get an error 'incorrect syntax near @query'

does SQL server allow for creating a cursor based on a select statement
built into a variable ? and if so what am I doing wrong ?

Thanks For Your Help !
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform