I am running the following code. I am loosing records when I run this in webfocus does anyone know why this might be happening? This should get 401 records and I am getting 334.
SQL SQLORA
SELECT T.OWNER AS TABLE_OWNER,
T.TABLE_NAME,
CASE WHEN T.TABLE_NAME LIKE '%DIM'
THEN 'DIM' ELSE 'FACT' END AS TABLE_TYPE,
SUBSTR(TC.COMMENTS, 1,10) as TABLE_COMMENT,
C.COLUMN_NAME,
C.COLUMN_ID,
SUBSTR(CC.COMMENTS,1,10) AS COL_COMMENT
FROM ALL_TABLES T
JOIN ALL_TAB_COMMENTS TC
ON T.OWNER = TC.OWNER
AND T.TABLE_NAME = TC.TABLE_NAME
AND T.OWNER IN ('DWHDBA')
AND (T.TABLE_NAME LIKE 'DM_DTD%'
OR T.TABLE_NAME LIKE 'DM%DIM')
AND T.TABLE_NAME NOT LIKE 'DM_EVT%'
AND T.TABLE_NAME NOT LIKE 'DM_R%'
AND T.TABLE_NAME NOT IN
('DM_DTD_WKLY_FACT_REBUILD',
'DM_CTRL',
'DM_ACT_FACT',
'DM_CONS_SAL_FACT',
'DM_CR_FACT',
'DM_SAL_FACT',
'DM_PAR_FACT',
'DM_CUST_PR_PL_DIM',
'DM_ORD_TY_DIM',
'DM_TM_MO_DIM',
'DM_DLY_SAL_FACT' )
JOIN ALL_TAB_COLUMNS C
ON T.OWNER = C.OWNER
AND T.TABLE_NAME = C.TABLE_NAME
AND C.COLUMN_NAME != 'LD_ID'
JOIN ALL_COL_COMMENTS CC
ON T.OWNER = CC.OWNER
AND T.TABLE_NAME = CC.TABLE_NAME
AND C.COLUMN_NAME = CC.COLUMN_NAME
ORDER BY 3,2,6
;
TABLE FILE SQLOUT
PRINT *
END
-EXIT
WebFOCUS 7.61
Windows 2003
Output: EXCEL, HTML and PDF