| re: Join same column with different data.
`ObjectCustomFieldValues`.`Content` as `sev`,
`ObjectCustomFieldValues`.`Content` as `tt`
So the return value of this query looks somewhat like this:
EffectiveId, 'Subject', Created, OldValue, NewValue, Tcreated, sev, tt
33544, 'Flapping.', '2009-08-02 22:19:18', 'new', 'open', '2009-08-02 22:34:35', 'Problem', 'Problem'
33544, 'Flapping.', '2009-08-02 22:19:18', 'new', 'open', '2009-08-02 22:34:35', 'Severity 3', 'Severity 3'
What I would like to see is:
33544, 'Flapping.', '2009-08-02 22:19:18', 'new', 'open', '2009-08-02 22:34:35', 'Severity 3', Problem
As you can see they are pulled from the same column in the same table.
but that column contains different information for each custom field, so the the ones with CustomField of 24 go into tt, and CustomField 32 goes into sev. Basically so they end up in thier own columns in the query return.
Yes I know it is confusing, like I said, I didn't write the database, which is good for single lookups, but poor for reporting on multiple entries.
|