Start a new topic

Basic example of SQL Query for Attribute

The "SELECT RECORDS.ID FROM RECORDS" that appears above the editor window on SQL Queries
is the prefix for all SQL queries executed. Anything you enter will be appended to that base statement.

This is for a table type attribute:

LEFT OUTER JOIN ConstituentAttributes AS CA
ON CA.PARENTID = RECORDS.ID
INNER JOIN TABLEENTRIES AS AttributeDescription
ON AttributeDescription.TABLEENTRIESID = CA.TABLEENTRIESID
INNER JOIN AttributeTypes AS AT
ON AT.ATTRIBUTETYPESID = CA.ATTRIBUTETYPESID
INNER JOIN CODETABLES AS AttributeName
ON AttributeName.CODETABLESID = AT.CODETABLESID
WHERE AttributeName.NAME = 'Committees'
AND AttributeDescription.LONGDESCRIPTION = 'Nominating'

Login or Signup to post a comment