Friday, January 25, 2013

CZ: Query to get property values associated with model node

Query to get all property values associated with all model names for given property.

SELECT DISTINCT D.NAME MODEL_NAME,
N.NAME NODE_NAME, P.NAME PROP_NAME, v.data_value text_value, v.data_num_value numeric_value
FROM cz_ps_prop_vals V, CZ_PROPERTIES P, CZ_PS_NODES N, CZ_DEVL_PROJECTS D
WHERE 1=1
AND V.DELETED_FLAG=0
AND N.DELETED_FLAG=0
AND D.DELETED_FLAG=0
AND P.DELETED_FLAG=0
AND V.PROPERTY_ID = P.PROPERTY_ID
AND V.PS_NODE_ID = N.PS_NODE_ID
AND N.DEVL_PROJECT_ID = D.DEVL_PROJECT_ID
AND P.name like '%LENGTH%' --property filter criteria
order by 1;

No comments:

Post a Comment