Im going to create a DELETE AND UPDATE store procedure in SQL to delete a service agreement from the table based on the expiry date.can someone teach me how?thankx...
CREATE PROCEDURE [sp_yourspname]
as
delete from yourtable where expirydate<getdate()
GO
obviously you need to think about other tables that might store information about the same service agreement. you can script many deletes/updates etc in the same sp
Also do you really need to delete it??? isnt it best just to just create a query to only select non-expired agreements as you may want to revive the record by updating the expiry date
But the point is my table do not hav a field call expiry date.It only have date Purchasedate ,month existance ,and duration only...!i do not nkow how to write the statements...!need for urgent!thankc....
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.