In addition to Marcs valuable Project server database schema resource, use
the project server reporting database to query your information. When it
comes to custom fields, project server will dynamically generate views at
project, task and resource level to include any new custom fields you setup.
These fileds can always be found at the end of the views columns. Since you
are after a task level custom field, the view name you want is
[MSP_EpmTask_UserView]
Just a note in terms of SQL performance, using a view will be more taxing on
a server then a normal direct table query but depending on the task you
require, you will likely find this difference insignificant but still worth
knowing. If you would prefer to query the custom fields tables directly,
right click an appropriate view and select 'design' to get an undertstanding
of how the view is doing this already.
As a quick reference guide
Project level, use [MSP_EpmProject_UserView]
Task level, use [MSP_EpmTask_UserView]
Resource level, use [MSP_EpmResource_UserView]
You can even view assignment level information too in
[MSP_EpmAssignment_UserView] Task custom fields will be suffixed with '_T'
and custom resource fields will be suffixed with '_R'
Hope this helps.
Regards,
Piet Remen