How can we get database name in progress openedge like in SQL we can get database name by using show databases; or SELECT schema_name FROM information_schema.schemata; using SQL query to openedge DB.
3 Answers
In ABL you can
DEFINE VARIABLE i AS INTEGER NO-UNDO.
DO i = 1 TO NUM-DBS:
MESSAGE LDBNAME (i) SKIP
PDBNAME (i) SKIP
DBPARAM (i)
VIEW-AS ALERT-BOX INFORMATION BUTTONS OK.
END.
In OpenEdge SQL the SHOW CATALOGS command returns the database/catalog names:
SHOW CATALOGS PRO_NAME;
2 Comments
Abhishek C
I want in SQL query not in ABL.
Tom Bascom
You tagged your question with "progress-4gl". That gives people the idea that maybe you're using the 4gl engine. Which also contains some (very limited) SQL syntax.
Just in case the link to "Progress Communities" goes away:
Valeriy Bashkatov (Progress Technologies LLC)
You should run this with a DBA privileged user.
select * from sysprogress.SYSTABLES;
select * from sysprogress.SYSTABLES_FULL;
select * from sysprogress.SYSCOLUMNS where TBL = 'table_name';
select * from sysprogress.SYSCOLUMNS_FULL where TBL = 'table_name';