Thursday, February 14, 2008

Useful SQL's -- Siebel

Query to identify all Custom Column Extensions

SELECT TABLE_NAME, COLUMN_NAME
FROM ALL_TAB_COLUMNS
WHERE
OWNER='SIEBEL' AND
TABLE_NAME LIKE 'S\_%' ESCAPE '\' AND
COLUMN_NAME LIKE 'X\_%' ESCAPE '\';

Query to identify all Custom Indices

SELECT INDEX_NAME, COLUMN_NAME, TABLE_NAME
FROM ALL_IND_COLUMNS
WHERE
TABLE_NAME LIKE 'S\_%' ESCAPE '\' AND
COLUMN_NAME LIKE 'X\_%' ESCAPE '\' AND
TABLE_OWNER = 'SIEBEL';

Query to identify all Custom Tables

SELECT TABLE_NAME
FROM ALL_TABLES
WHERE
OWNER='SIEBEL' AND
TABLE_NAME LIKE 'CX\_%' ESCAPE '\';

No comments: