SQL oracle pb avec un select PPM

Résolu/Fermé
bibiman23 Messages postés 37 Date d'inscription mercredi 8 juillet 2009 Statut Membre Dernière intervention 21 novembre 2011 - 25 août 2009 à 15:30
bibiman23 Messages postés 37 Date d'inscription mercredi 8 juillet 2009 Statut Membre Dernière intervention 21 novembre 2011 - 26 août 2009 à 11:31
Bonjour,
Dans un progiciel (PPM) je met ma requête pour pouvoir générer des portlets (des vues)
Le souci c'est qu'il me génère un select * from (ma requête) where rownum <200 (cette limitation a été instaurée pour limiter l'affichage). je n'ai pas la mai pour virer le select *.
Le souci c'est qu'un simple select count (*) from (ma requête) where rownum <200 marche mais pas ce qu'il m'a généré en auto.

Ma requête est:

SELECT * from (
SELECT krq.Request_ID REQUEST_ID, kst.STATUS_NAME STATUT, krq.DESCRIPTION DECRIPTION, kus.FULL_NAME NAME_USER_LAST_UPDATE, krq.LAST_UPDATE_DATE DATE_LAST_UPDATE, krq.CREATION_DATE CREATION_DATE, krq.CREATED_BY CREATED_BY, replace(krhd.VISIBLE_PARAMETER1,'#@#',', ') HEADER_VISIBLE_PARAMETER, replace(krhd.VISIBLE_PARAMETER2,'#@#',', ') HEADER_VISIBLE_PARAMET_2, replace(krhd.VISIBLE_PARAMETER3,'#@#',', ') HEADER_VISIBLE_PARAMET_3, replace(krhd.VISIBLE_PARAMETER4,'#@#',', ') HEADER_VISIBLE_PARAMET_4, replace(krhd.VISIBLE_PARAMETER5,'#@#',', ') HEADER_VISIBLE_PARAMET_5, replace(krhd.VISIBLE_PARAMETER6,'#@#',', ') HEADER_VISIBLE_PARAMET_6, replace(krhd.VISIBLE_PARAMETER7,'#@#',', ') HEADER_VISIBLE_PARAMET_7, replace(krhd.VISIBLE_PARAMETER8,'#@#',', ') HEADER_VISIBLE_PARAMET_8, replace(krhd.VISIBLE_PARAMETER9,'#@#',', ') HEADER_VISIBLE_PARAMET_9, replace(krhd.VISIBLE_PARAMETER10,'#@#',', ') HEADER_VISIBLE_PARAME_10, replace(krhd.VISIBLE_PARAMETER11,'#@#',', ') HEADER_VISIBLE_PARAME_11, replace(krhd.VISIBLE_PARAMETER12,'#@#',', ') HEADER_VISIBLE_PARAME_12, replace(krhd.VISIBLE_PARAMETER13,'#@#',', ') HEADER_VISIBLE_PARAME_13, replace(krhd.VISIBLE_PARAMETER14,'#@#',', ') HEADER_VISIBLE_PARAME_14, replace(krhd.VISIBLE_PARAMETER15,'#@#',', ') HEADER_VISIBLE_PARAME_15, replace(krhd.VISIBLE_PARAMETER16,'#@#',', ') HEADER_VISIBLE_PARAME_16, replace(krhd.VISIBLE_PARAMETER17,'#@#',', ') HEADER_VISIBLE_PARAME_17, replace(krhd.VISIBLE_PARAMETER18,'#@#',', ') HEADER_VISIBLE_PARAME_18, replace(krhd.VISIBLE_PARAMETER19,'#@#',', ') HEADER_VISIBLE_PARAME_19, replace(krhd.VISIBLE_PARAMETER20,'#@#',', ') HEADER_VISIBLE_PARAME_20, replace(krhd.VISIBLE_PARAMETER21,'#@#',', ') HEADER_VISIBLE_PARAME_21, replace(krhd.VISIBLE_PARAMETER22,'#@#',', ') HEADER_VISIBLE_PARAME_22, replace(krhd.VISIBLE_PARAMETER23,'#@#',', ') HEADER_VISIBLE_PARAME_23, replace(krhd.VISIBLE_PARAMETER24,'#@#',', ') HEADER_VISIBLE_PARAME_24, replace(krhd.VISIBLE_PARAMETER25,'#@#',', ') HEADER_VISIBLE_PARAME_25, replace(krhd.VISIBLE_PARAMETER26,'#@#',', ') HEADER_VISIBLE_PARAME_26, replace(krhd.VISIBLE_PARAMETER27,'#@#',', ') HEADER_VISIBLE_PARAME_27, replace(krhd.VISIBLE_PARAMETER28,'#@#',', ') HEADER_VISIBLE_PARAME_28, replace(krhd.VISIBLE_PARAMETER29,'#@#',', ') HEADER_VISIBLE_PARAME_29, replace(krhd.VISIBLE_PARAMETER30,'#@#',', ') HEADER_VISIBLE_PARAME_30, replace(krhd.VISIBLE_PARAMETER31,'#@#',', ') HEADER_VISIBLE_PARAME_31, replace(krhd.VISIBLE_PARAMETER32,'#@#',', ') HEADER_VISIBLE_PARAME_32, replace(krhd.VISIBLE_PARAMETER33,'#@#',', ') HEADER_VISIBLE_PARAME_33, replace(krhd.VISIBLE_PARAMETER34,'#@#',', ') HEADER_VISIBLE_PARAME_34, case krt.REQUEST_TYPE_NAME when 'PEO - Projet' then trim(to_char(to_number(krd.VISIBLE_PARAMETER35,'999999D999999','NLS_NUMERIC_CHARACTERS = '', '''),'999990D9','NLS_NUMERIC_CHARACTERS = '', ''')) else replace(krd.VISIBLE_PARAMETER35,'#@#',', ') end HEADER_VISIBLE_PARAME_35, replace(krhd.VISIBLE_PARAMETER36,'#@#',', ') HEADER_VISIBLE_PARAME_36, replace(krhd.VISIBLE_PARAMETER37,'#@#',', ') HEADER_VISIBLE_PARAME_37, replace(krhd.VISIBLE_PARAMETER38,'#@#',', ') HEADER_VISIBLE_PARAME_38, replace(krhd.VISIBLE_PARAMETER39,'#@#',', ') HEADER_VISIBLE_PARAME_39, replace(krhd.VISIBLE_PARAMETER40,'#@#',', ') HEADER_VISIBLE_PARAME_40, replace(krhd.VISIBLE_PARAMETER41,'#@#',', ') HEADER_VISIBLE_PARAME_41, replace(krhd.VISIBLE_PARAMETER42,'#@#',', ') HEADER_VISIBLE_PARAME_42, replace(krhd.VISIBLE_PARAMETER43,'#@#',', ') HEADER_VISIBLE_PARAME_43, replace(krhd.VISIBLE_PARAMETER44,'#@#',', ') HEADER_VISIBLE_PARAME_44, replace(krhd.VISIBLE_PARAMETER45,'#@#',', ') HEADER_VISIBLE_PARAME_45, replace(krhd.VISIBLE_PARAMETER46,'#@#',', ') HEADER_VISIBLE_PARAME_46, replace(krhd.VISIBLE_PARAMETER47,'#@#',', ') HEADER_VISIBLE_PARAME_47, replace(krhd.VISIBLE_PARAMETER48,'#@#',', ') HEADER_VISIBLE_PARAME_48, replace(krhd.VISIBLE_PARAMETER49,'#@#',', ') HEADER_VISIBLE_PARAME_49, replace(krhd.VISIBLE_PARAMETER50,'#@#',', ') HEADER_VISIBLE_PARAME_50, replace(krd.VISIBLE_PARAMETER1,'#@#',', ') REQUEST_VISIBLE_PARAM_50, replace(krd.VISIBLE_PARAMETER2,'#@#',', ') REQUEST_VISIBLE_PARAME_2, replace(krd.VISIBLE_PARAMETER3,'#@#',', ') REQUEST_VISIBLE_PARAME_3, replace(krd.VISIBLE_PARAMETER4,'#@#',', ') REQUEST_VISIBLE_PARAME_4, replace(krd.VISIBLE_PARAMETER5,'#@#',', ') REQUEST_VISIBLE_PARAM_50, replace(krd.VISIBLE_PARAMETER6,'#@#',', ') REQUEST_VISIBLE_PARAME_6, case krt.REQUEST_TYPE_NAME when 'PEO - Projet' then trim(to_char(to_number(krd.VISIBLE_PARAMETER7,'999999D999999','NLS_NUMERIC_CHARACTERS = '', '''),'999990D9','NLS_NUMERIC_CHARACTERS = '', ''')) else replace(krd.VISIBLE_PARAMETER7,'#@#',', ') end REQUEST_VISIBLE_PARAME_7, case krt.REQUEST_TYPE_NAME when 'PEO - Projet' then trim(to_char(to_number(krd.VISIBLE_PARAMETER8,'999999D999999','NLS_NUMERIC_CHARACTERS = '', '''),'999990D9','NLS_NUMERIC_CHARACTERS = '', ''')) else replace(krd.VISIBLE_PARAMETER8,'#@#',', ') end REQUEST_VISIBLE_PARAMETE, replace(krd.VISIBLE_PARAMETER9,'#@#',', ') REQUEST_VISIBLE_PARAME_9, replace(krd.VISIBLE_PARAMETER10,'#@#',', ') REQUEST_VISIBLE_PARAM_10, replace(krd.VISIBLE_PARAMETER11,'#@#',', ') REQUEST_VISIBLE_PARAME_5, replace(krd.VISIBLE_PARAMETER12,'#@#',', ') REQUEST_VISIBLE_PARAM_11, replace(krd.VISIBLE_PARAMETER13,'#@#',', ') REQUEST_VISIBLE_PARAM_12, replace(krd.VISIBLE_PARAMETER14,'#@#',', ') REQUEST_VISIBLE_PARAM_13, replace(krd.VISIBLE_PARAMETER15,'#@#',', ') REQUEST_VISIBLE_PARAM_14, replace(krd.VISIBLE_PARAMETER16,'#@#',', ') REQUEST_VISIBLE_PARAM_15, replace(krd.VISIBLE_PARAMETER17,'#@#',', ') REQUEST_VISIBLE_PARAM_16, replace(krd.VISIBLE_PARAMETER18,'#@#',', ') REQUEST_VISIBLE_PARAM_17, replace(krd.VISIBLE_PARAMETER19,'#@#',', ') REQUEST_VISIBLE_PARAM_18, replace(krd.VISIBLE_PARAMETER20,'#@#',', ') REQUEST_VISIBLE_PARAM_19, replace(krd.VISIBLE_PARAMETER21,'#@#',', ') REQUEST_VISIBLE_PARAM_20, replace(krd.VISIBLE_PARAMETER22,'#@#',', ') REQUEST_VISIBLE_PARAM_21, replace(krd.VISIBLE_PARAMETER23,'#@#',', ') REQUEST_VISIBLE_PARAM_22, replace(krd.VISIBLE_PARAMETER24,'#@#',', ') REQUEST_VISIBLE_PARAM_23, replace(krd.VISIBLE_PARAMETER25,'#@#',', ') REQUEST_VISIBLE_PARAM_24, replace(krd.VISIBLE_PARAMETER26,'#@#',', ') REQUEST_VISIBLE_PARAM_25, replace(krd.VISIBLE_PARAMETER27,'#@#',', ') REQUEST_VISIBLE_PARAM_26, replace(krd.VISIBLE_PARAMETER28,'#@#',', ') REQUEST_VISIBLE_PARAM_27, replace(krd.VISIBLE_PARAMETER29,'#@#',', ') REQUEST_VISIBLE_PARAM_28, replace(krd.VISIBLE_PARAMETER30,'#@#',', ') REQUEST_VISIBLE_PARAM_29, replace(krd.VISIBLE_PARAMETER31,'#@#',', ') REQUEST_VISIBLE_PARAM_30, case krt.REQUEST_TYPE_NAME when 'PEO - Programme' then trim(to_char(to_number(krd.VISIBLE_PARAMETER32,'999999D999999','NLS_NUMERIC_CHARACTERS = '', '''),'999990D9','NLS_NUMERIC_CHARACTERS = '', ''')) else replace(krd.VISIBLE_PARAMETER32,'#@#',', ') end REQUEST_VISIBLE_PARAM_31, case krt.REQUEST_TYPE_NAME when 'PEO - Programme' then trim(to_char(to_number(krd.VISIBLE_PARAMETER33,'999999D999999','NLS_NUMERIC_CHARACTERS = '', '''),'999990D9','NLS_NUMERIC_CHARACTERS = '', ''')) else replace(krd.VISIBLE_PARAMETER33,'#@#',', ') end REQUEST_VISIBLE_PARAM_32, case krt.REQUEST_TYPE_NAME when 'PEO - Programme' then trim(to_char(to_number(krd.VISIBLE_PARAMETER34,'999999D999999','NLS_NUMERIC_CHARACTERS = '', '''),'999990D9','NLS_NUMERIC_CHARACTERS = '', ''')) else replace(krd.VISIBLE_PARAMETER34,'#@#',', ') end REQUEST_VISIBLE_PARAM_33, case krt.REQUEST_TYPE_NAME when 'PEO - Projet' then trim(to_char(to_number(krd.VISIBLE_PARAMETER35,'999999D999999','NLS_NUMERIC_CHARACTERS = '', '''),'999990D9','NLS_NUMERIC_CHARACTERS = '', ''')) else replace(krd.VISIBLE_PARAMETER35,'#@#',', ') end REQUEST_VISIBLE_PARAM_34, case krt.REQUEST_TYPE_NAME when 'PEO - Projet' then trim(to_char(to_number(krd.VISIBLE_PARAMETER36,'999999D999999','NLS_NUMERIC_CHARACTERS = '', '''),'999990D9','NLS_NUMERIC_CHARACTERS = '', ''')) else replace(krd.VISIBLE_PARAMETER36,'#@#',', ') end REQUEST_VISIBLE_PARAME_8, case krt.REQUEST_TYPE_NAME when 'PEO - Projet' then trim(to_char(to_number(krd.VISIBLE_PARAMETER37,'999999D999999','NLS_NUMERIC_CHARACTERS = '', '''),'999990D9','NLS_NUMERIC_CHARACTERS = '', ''')) else replace(krd.VISIBLE_PARAMETER37,'#@#',', ') end REQUEST_VISIBLE_PARAM_35, replace(krd.VISIBLE_PARAMETER38,'#@#',', ') REQUEST_VISIBLE_PARAM_37, replace(krd.VISIBLE_PARAMETER39,'#@#',', ') REQUEST_VISIBLE_PARAM_38, replace(krd.VISIBLE_PARAMETER40,'#@#',', ') REQUEST_VISIBLE_PARAM_39, replace(krd.VISIBLE_PARAMETER41,'#@#',', ') REQUEST_VISIBLE_PARAM_40, replace(krd.VISIBLE_PARAMETER42,'#@#',', ') REQUEST_VISIBLE_PARAM_41, replace(krd.VISIBLE_PARAMETER43,'#@#',', ') REQUEST_VISIBLE_PARAM_42, replace(krd.VISIBLE_PARAMETER44,'#@#',', ') REQUEST_VISIBLE_PARAM_43, replace(krd.VISIBLE_PARAMETER45,'#@#',', ') REQUEST_VISIBLE_PARAM_44, replace(krd.VISIBLE_PARAMETER46,'#@#',', ') REQUEST_VISIBLE_PARAM_45, replace(krd.VISIBLE_PARAMETER47,'#@#',', ') REQUEST_VISIBLE_PARAM_46, replace(krd.VISIBLE_PARAMETER48,'#@#',', ') REQUEST_VISIBLE_PARAM_47, replace(krd.VISIBLE_PARAMETER49,'#@#',', ') REQUEST_VISIBLE_PARAM_48, replace(krd.VISIBLE_PARAMETER50,'#@#',', ') REQUEST_VISIBLE_PARAM_49, kpfm.PRJ_PROJECT_MANAGER_USERNAME PROJECT_MANAGER_NAME, kpfm.PRJ_PLAN_START_PERIOD_NAME PLAN_START_PERIOD, kpfm.PRJ_PLAN_FINISH_PERIOD_NAME PLAN_FINISH_PERIOD, krt.REQUEST_TYPE_NAME REQUEST_TYPE, kpfm.PROJECT_NAME PROJECT_NAME
FROM kcrt_request_types krt,
kcrt_requests krq,
kcrt_request_details krd,
kcrt_req_header_details krhd,
kcrt_statuses kst,
kcrt_fg_pfm_project kpfm,
knta_users kus
WHERE 1=1
AND krq.REQUEST_TYPE_ID = krt.REQUEST_TYPE_ID
AND krhd.REQUEST_ID = krq.REQUEST_ID
AND krq.STATUS_ID = kst.STATUS_ID
AND krq.REQUEST_ID = kpfm.REQUEST_ID
AND krq.REQUEST_ID = krd.REQUEST_ID
AND krq.LAST_UPDATED_BY = kus.USER_ID
AND krq.status_code <> 'CANCELLED'
AND krd.BATCH_NUMBER=1
AND krt.request_type_name IN ('PEO - Projet')
and krhd.Visible_Parameter10 like'%ATT - TEst Pgm V2.1%'
ORDER BY REQUEST_VISIBLE_PARAMETE ASC
) WHERE rownum <= 200

1 réponse

bibiman23 Messages postés 37 Date d'inscription mercredi 8 juillet 2009 Statut Membre Dernière intervention 21 novembre 2011 3
26 août 2009 à 11:31
J'ai réglé le problème.
0