Created
September 3, 2021 05:53
-
-
Save corneil/6462e88b3833c68b0835b37774d5f44f to your computer and use it in GitHub Desktop.
Find a DB2 table name and column from SQLCODE=-407, SQLSTATE=23502
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT C.TABSCHEMA, C.TABNAME, C.COLNAME | |
FROM SYSCAT.TABLES AS T, SYSCAT.COLUMNS AS C | |
WHERE T.TBSPACEID = -- TBSPACEID | |
AND T.TABLEID = -- TABLEID | |
AND C.COLNO = -- COLNO | |
AND C.TABSCHEMA = T.TABSCHEMA | |
AND C.TABNAME = T.TABNAME |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment