Interview topics

1 comment:

Ganesh Ponna said...

'009190', '009236', '009275', '009310', '009319', '009320', '009321', '009322', '009323', '009324', '009325', '009326', '009327', '009328', '009419', '009459', '009460', '009461', '009462', '009463', '009464', '009582', '009590', '009591', '009594', '009616', '009617', '009618', '009619', '009620', '009621', '009622', '009623', '009624'
)
and dstrct_code='RTK1'
GROUP BY COLUMN_NAME

So i would then get the list of all values for each column name and how often they are populated.

It should be something along the lines of..

DECLARE

BEGIN
FOR RRR IN (

SELECT DISTINCT TABLE_NAME, COLUMN_NAME FROM ALL_TAB_COLUMNS
WHERE OWNER ='ELLIPSE'
AND TABLE_NAME='MSF690'
AND COLUMN_NAME<>'STD_JOB_NO'
ORDER BY TABLE_NAME
)
LOOP
EXECUTE IMMEDIATE 'select ' ||
RRR.COLUMN_NAME || ', COUNT(STD_JOB_NO)
from msf690
where std_job_no in (
'009045', '009053', '009188', '009189', '009190', '009236', '009275', '009310', '009319', '009320', '009321', '009322', '009323', '009324', '009325', '009326', '009327', '009328', '009419', '009459', '009460', '009461', '009462', '009463', '009464', '009582', '009590', '009591', '009594', '009616', '009617', '009618', '009619', '009620', '009621', '009622', '009623', '009624'
)
and dstrct_code='RTK1'
GROUP BY RRR.COLUMN_NAME'

and then i want to dbms_output this without inserting the values into a table as I don't have permissions to create tables.








Great effort, I wish I saw it earlier. Would have saved my day :)


,Merci

 
Top Blogs