Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
How to distinguish a Workspace from a Document in the DOCMASTER table?
mlf
What is the 100% guaranteed way to distinguish a workspace from a document in the DOCMASTER table?
I see a C_ALIAS column which seems to be "WEBDOC" for a Workspace and various other values for a Document.
I see a TYPE column which seems to be "P" for a Workspace and "D" for a document.
I also see a PROJECTS table which seems to Join with DOCMASTER for workspaces but not for documents.
Any other suggestions?
What is the best method to use?
Find more posts tagged with
Comments
Migrateduser
Hi mlf, as you said workspaces in docmaster are joined with projects table. They are joined on DOCNUM value.
In Projects tables you will see that workspaces are subtype = 'work'
So, the best way is selecting from projects where subtype = 'work' and join with docmaster on docnum.
- Projects table has workspace properties as a containner
- Docmaster table has workspace properties about profile (custom1, dates, etc)
Please take much care about what you use SQL for....if it is for consulting...ok but for updating....it is very dangerous.
Hope it helps,
Javi
mlf
Hi Javi, thanks for the explanation.
Is there anything other than Workspaces and Documents stored in the DOCMASTER table?
Arwin
You should use the Type column instead. This is far more reliable. There are definitely more types of documents than just D and P. There is also 5 (compound document), and then there are a whole series of items related to worksite web, although if your client does not use worksite web, you will not see these items in your database of course.
My experience is that you should as a general rule cater for Type 5 and D if you want to deal with documents. Type P in the Docmaster should always be a workspace as far as I know (folders are not in the docmaster table).
I use the Type column also to gather useful statistics about your database, e.g. for Index sizing purposes, growth rate and planning. A "select count type from MHGROUP.DOCMASTER group by count" sql query gives a nice overview of all the types of items that live in your database.