Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Update from Select
Message
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Stored procedures, Triggers, UDFs
Divers
Thread ID:
01673282
Message ID:
01673305
Vues:
45
>>The lowest version is SQL Server 2008 (Express edition). And the FIFO is the correct answer.
>>
>>Question: I am doing all my testing on a temp table. That is, I create a temp table and copy the records from the actual table to the temp table (so, that I don't mess up the real data). And in the SSMS all variables for the temp table are shown with the red squiggly line (under). But the code works. Is this normal that the temp table has these squiggly red lines?
>>
>https://blog.sqlauthority.com/2013/07/04/sql-server-how-to-refresh-ssms-intellisense-cache-to-update-schema-changes/
>
>Too bad that your lowest version is SQL Server 2008 because otherwise it would be a simpler solution.
>

One more thing to keep in mind. The actual solution would need to have an insert into another table, for every iteration/loop of quantity removed from the table in the example. That is, when a certain quantity is removed from the In-Stock table, a new record should be added to the Used-Stock table. But this should be straight forward, since within the WHILE, and right after the SQL update/Select (that you created), I will have SQL Insert into another table.
"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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform