Quantcast
Channel: Project Customization and Programming forum
Viewing all articles
Browse latest Browse all 5347

Creating an SQL Query for Project Custom Fields Values

$
0
0

Hello:

I'm currently trying to create an SQL Query to show all of the server's Project Custom Fields Values, along with the modification date.

So far, I've managed to display correctly all of the data for all of the Projects' text value Custom Fields (those not based on a LookUp Table) with this query:

SELECT
MSP_PROJECTS.PROJ_NAME,
MSP_CUSTOM_FIELDS.MD_PROP_NAME,
MSP_PROJ_CUSTOM_FIELD_VALUES.CODE_VALUE,
MSP_PROJ_CUSTOM_FIELD_VALUES.TEXT_VALUE,
MSP_PROJ_CUSTOM_FIELD_VALUES.MOD_DATE
FROM
MSP_PROJ_CUSTOM_FIELD_VALUES
INNER JOIN
MSP_CUSTOM_FIELDS
ON MSP_CUSTOM_FIELDS.MD_PROP_UID = MSP_PROJ_CUSTOM_FIELD_VALUES.MD_PROP_UID
INNER JOIN
MSP_PROJECTS
ON MSP_PROJECTS.PROJ_UID = MSP_PROJ_CUSTOM_FIELD_VALUES.PROJ_UID
WHERE
MSP_PROJ_CUSTOM_FIELD_VALUES.CODE_VALUE IS NULL
ORDER BY
MSP_PROJ_CUSTOM_FIELD_VALUES.PROJ_UID,
MSP_PROJ_CUSTOM_FIELD_VALUES.MD_PROP_UID

However, when I try a new Query to obtain the actual values for the Projects Custom Fields that do use a LookUp Table, I can't seem to find what table in the model I'm supposed to link to the MSP_PROJ_CUSTOM_FIELD_VALUES.CODE_VALUE field (the TEXT_VALUE field has NULL value when CODE_VALUE field isn't NULL)

Any suggestions on how to obtain the actual Projects' custom fields values instead of the Code Value, for Metadata that do use a LookUp Table?

Also, I'm able to run this query only in the Published Database, since the MSP_CUSTOM_FIELDS table is empy in the Draft Database. Why is that?

Awaiting your kind reply,

 


Sebastián Armas PMO Project Manager

Viewing all articles
Browse latest Browse all 5347

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>