Chris Michalczuk
asked on
create a new stored procedure in SQL2012
I want to create a small stored procedure called UpdateOrderDate that runs this bit of code
How do I create it?
update [TC_Integration].[dbo].[tb l_orderhea ders]
set createddate ='2014-01-06 09:38:08.000'
How do I create it?
update [TC_Integration].[dbo].[tb
set createddate ='2014-01-06 09:38:08.000'
Caveat: This UPDATE will change every row in your table.
WHY would you create a stored procedure to sett ALL records of a table to a constant date/time value????????
Do you intent to have every record in that table "created" at '2014-01-06 09:38:08.000' no matter when you create them?
Do you intent to have every record in that table "created" at '2014-01-06 09:38:08.000' no matter when you create them?
perhaps use
GETDATE()
instead??
GETDATE()
instead??
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Clicking on New procedure will open script window
Hope this would help