Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Still working on indirection query
Message
 
À
05/02/2007 10:02:10
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2000
Divers
Thread ID:
01192348
Message ID:
01192398
Vues:
15
>>Remove table_w_data from your first query:
>>
>>cSQL = 'SELECT @Column2Get3=' + @Column2Get1 + ', @Column2Get4=' + @Column2Get2
>> .....
>>

>
>When I do I get:
>
>"Must declare the variable '@Column2Get3'."
>
>which I guess it means a scope problem as it runs in a separate batch.

Sorry, I copy and paste that from your first message, it should be:
cSQL = 'SELECT @Column2Get3Out=' + @Column2Get1 + ', @Column2Get4Out=' + @Column2Get2
...
The variables inside the string must be with the same name as these declared in @ParamDeff
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform