You are viewing limited content. For full access, please sign in.

Question

Question

Getting the Created By field

asked on June 19, 2019

I can run the below query to get the document count from repository database. How can I also get the "Created By' field please? I see toc_owner column in this table. How do I join this to get the user name please?

 

Select * from toc
where etype = -2

 

Thanks

Priya

0 0

Replies

replied on June 19, 2019
Select tocid, name, account_name as creator_name from toc join account_cache on toc.creator=account_cache.account_sid
where etype = -2

The account_cache table stores the mapping from SID to account names. It is not guaranteed to contain every account that is referenced in the repository.

0 0
replied on June 19, 2019

Thanks

0 0
replied on June 19, 2019

Will this give me all documents in repository. Do I need to query doc table as well please? Does doc table just store the page count for each document?

 

Priya

0 0
replied on June 19, 2019

This query returns one row for every document in the repository, including those in the recycle bin. Doc table is one row per page.

0 0
replied on June 19, 2019

Thanks

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.