Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Common Table Expression Error
Message
Information générale
Forum:
ASP.NET
Catégorie:
Bases de données
Divers
Thread ID:
01531659
Message ID:
01531665
Vues:
44
>I am updating a CTE but cannot then select the rows:
>with MyCte as (Select * from MyTable)
>update MyCte set MyField = '111'
>...... works ok
>
>
>with MyCte as (Select * from MyTable)
>update MyCte set MyField = '111'
>Select * from MyCte
>......Gives Invalid Object name near cte
>
>Above is a simple example of what I am trying to do.
>I am hoping to use Common Table Expressions similar to Writable Cursors in VFP
>
>Tia
>Gerard

Gerard,

Common Table Expression can only be used immediatelly after its declaration. Your sample above doesn't make must sense, what exactly you're trying to do?

Also take a look at the OUTPUT clause of the UPDATE command.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform