AlexTheDroog
New Member
I'm using Epicor 9 with OpenEdge 10.1B drivers and SQuirrel SQL. I was attempting to locate what table contains a field called FailedBin. I wrote the following query but its seems to have some issues.
SELECT F."_Field-Name" AS "FieldName", T."_File-Name" AS "TableName"
FROM PUB."_Field" AS F, PUB."_File" AS T
WHERE F."_Field-Name" = 'FailedBin' AND T."_TBL-Type" = 'T' AND F."_File-recid" = RECID(T)
ORDER BY T."_File-Name",F."_Field-Name";
It doesn't like
T."_TBL-Type" = 'T'
and
T."_TBL-Type" = 'T' AND F."_File-recid" = RECID(T)
I got the idea from Progress KB - 4GL/ABL: What is the relationship between the _File and the _Field tables? but it’s not taking into account the query being written from an ODBC SQL environment
SELECT F."_Field-Name" AS "FieldName", T."_File-Name" AS "TableName"
FROM PUB."_Field" AS F, PUB."_File" AS T
WHERE F."_Field-Name" = 'FailedBin' AND T."_TBL-Type" = 'T' AND F."_File-recid" = RECID(T)
ORDER BY T."_File-Name",F."_Field-Name";
It doesn't like
T."_TBL-Type" = 'T'
and
T."_TBL-Type" = 'T' AND F."_File-recid" = RECID(T)
I got the idea from Progress KB - 4GL/ABL: What is the relationship between the _File and the _Field tables? but it’s not taking into account the query being written from an ODBC SQL environment