Reputation:
I am new to SharePoint development. I have a list, this list has a column that is called Todaysdate
. This column needs to be updated daily to today's actual date and since it contains ~20,000 rows I am NOT going to update it manually everyday. Because it's used in a calculation row.
My question is can I just use SQL and update the rows in the UserData table that correspond to the datetime
column that I need?
I can query the list of rows by something similar to
Select * from UserData where tp_ListID = 'GUID'
but the data contained in the column datetime3
is not just the Todaysdate
information. How do I return just the Todaysdate
info?
Upvotes: 0
Views: 1619
Reputation: 2773
You really should not query let alone update the SharePoint content database directly using SQL. It is totally unsupported, so if you break something you are left alone, and the database schema may change with future service packs / releases.
Also as noesgard mentioned it in his comment you do not need it to use today's date in a calculated field, see this blog entry on how you can do that.
Upvotes: 2