简体   繁体   中英

Access sharepoint list data in SQL

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM