Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Updating SQL Server table
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01655887
Message ID:
01655902
Vues:
47
>I was about to post same thing as Borislav, was a minute to late... Anyways, SQL generates two "cursors" you can use in the OUTPUT, inserted and deleted, the first one represents the new (inserted) values and the second one represent the old (deleted) values, it is easy to see in this sample code:
>
>

>declare @test table (pk int, event varchar(10), EventTime datetime)
>
>insert into @test (pk, event, EventTime) values (1, 'Start', '')
>
>update @test set eventtime = getdate() output deleted.pk, deleted.eventtime, inserted.eventtime where pk = 1
>

Thank you.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform