sys.objects

Training
Enthusiast

sys.objects

Hi everyone

 

What is Teradata conversion for this statement?

 

SELECT COUNT(*) as SPs_Count FROM sys.objects WHERE type = 'P'?

 

especially what is sys.objects equal in teradata?

2 REPLIES
Senior Supporter

Re: sys.objects

sometimes it is easier to ask the business question instead of posting other DB systems code.

I assume you want to count the SP in the system.

dbc.tables where tablekind = 'P'

would be the source and condition.

 

where there exists also external stored procedures....

Check the list of available tableKInd (- so sad that it is still called table and not object :-)) from the documentation

 

TableKind Column
Value Description
A Aggregate function
B Combined aggregate and ordered analytical function
Data Dictionary, Release 16.00
389Appendix A: View Column Values
TimeDimension Column
Value Description
C Table operator parser contract function
D JAR
E External stored procedure
F Standard function
G Trigger
H Instance or constructor method
I Join index
J Journal
K Foreign server object.
Note:
K is supported on the Teradata-to-Hadoop and Teradata-to-Teradata
connectors.
L User-defined table operator
M Macro
N Hash index
O Table with no primary index and no partitioning
P Stored procedure
Q Queue table
R Table function
S Ordered analytical function
T Table with a primary index or primary AMP index, partitioning, or both.
Or a partitioned table with NoPI
U User-defined type
V View
X Authorization
Y GLOP set
Z UIF
1 A DATASET schema object created by CREATE SCHEMA.

Enthusiast

Re: sys.objects

exactly, thank you very much!