Progress MetaData

gollumullog

New Member
Good Day,

I'm having trouble finding a fast and simple way of seeing if a column exists on a Progress Data base.

I can find out if the table exists using:
SELECT DISTINCT tbl FROM sysprogress."SYSTABLES" WHERE UPPER(tbl) = UPPER('TABLE-NAME')

But for some reason I cannot get the query:
SELECT col FROM sysprogress."SYSCOLUMNS" WHERE tbl = "TABLE-NAME" AND col = \"COLUMN-NAME\"

When I do a select * on SYSCOLUMNS I do not see any of the tables I expect to see.

Am I missing some permissions?

Can someone help me?

Cheers
Jason
 
I can't help you on the SQL side, o palindromic one, but the meta info you are looking for is held in _File and _Field tables.

I only know how to do that stuff in 4GL, and there are lots of entries regarding that in the PSDN knowledgebase.

Here's a line from KB P100012 along SQL lines (check the related entry also):

SELECT * FROM pub."_field" WHERE "_file-recid" = (SELECT ROWID FROM
pub."_file" WHERE "_file-name" = 'department');

http://tinyurl.com/y36zlv
 
SELECT col FROM sysprogress."SYSCOLUMNS" WHERE tbl = "TABLE-NAME" AND col = \"COLUMN-NAME\"

When I do a select * on SYSCOLUMNS I do not see any of the tables I expect to see.

But KB P107755 reckons

SELECT * FROM SYSCOLUMNS WHERE SYSCOLUMNS.TBL = 'tablename';

will show details, so maybe you are doing it right and it is some other issue, I don't know.
 
But KB P107755 reckons

SELECT * FROM SYSCOLUMNS WHERE SYSCOLUMNS.TBL = 'tablename';

will show details, so maybe you are doing it right and it is some other issue, I don't know.


Thanks for the quick response.

Yeah reading the docs, I should be able to do the query I tried, but for some reason, I don't seem to have access to all the "tables" in SYSCOLUMNS.

I'm guessing there is a permission issue. or something similar.
 
Back
Top