0
votes

In TERADATA we use SHOW PROCEDURE [procedure_name] to show the procedure definition/body.

where can I query the procedures' bodies in a way similar to querying views definitions from DBC.TABLESV

SELECT requesttext FROM dbc.tablesv WHERE tablename=[view_name]
1

1 Answers

1
votes

There's no way besides SHOW PROCEDURE, as the actual source code is not found in any DBC table.

Source and compiled SP are stored internally in a subtable, which can't be accessed directly.

Edit:

There's a Java-XSP from Glenn McCall which returns the result of a SHOW, can be found on Teradata's community site: Running Unsupported Queries from a Stored Procedure You should be able to run this from a cursor in an SP, but it's probably not very efficient.