D
D4WNO
Hi everyone,
I currently have the below code which unfortunately for me means I nee
to update 2 dates (Last Updated dates). This is changed depending o
when I alst ran it. The reason I have this is because it is pulling dat
back from a database but needs to search in 2 places for this (they hav
different "TYPE" fields). At the moment I can only get it to bring bac
data for both by having a date search for both of them also. If I jus
have one at the end of the queryit searches for ALL CERPS BI and onl
filters the CERPS by the dates. I'm sure I just need to move som
brackets around somewhere but I can't figure it out. Any help is MUC
appreciated
1) TYPE = 'INFORMATION ANALYSIS APP' AND (CATEGORY = 'CERPS BI')
2) TYPE = 'MANUFACT AND SUPPLY CHAIN' AND (CATEGORY = 'BEBOP' O
CATEGORY = 'CERPS' OR CATEGORY = 'ICERPS' OR CATEGORY = 'JCERPS' O
CATEGORY = 'MERPS' OR CATEGORY = 'MERPS2' OR CATEGORY = 'STIEFEL SAP' O
CATEGORY = 'MOD CF')
from ARAdmin.GSK_INCIDENT where TYPE = 'INFORMATION ANALYSIS APP' AN
(CATEGORY = 'CERPS BI') AND ((TO_DATE(TO_DATE('01/01/197
00:00:00','MM/DD/YYYY HH24:MI:SS') + ((LAST_UPDATED)/(86400))
'DD/MM/YYYY HH24:MI:SS')) BETWEEN TO_DATE('13/11/201
23:59:59','DD/MM/YYYY HH24:MI:SS') AND TO_DATE('14/11/201
23:59:59','DD/MM/YYYY HH24:MI:SS') ) OR TYPE = 'MANUFACT AND SUPPL
CHAIN' AND (CATEGORY = 'BEBOP' OR CATEGORY = 'CERPS' OR CATEGORY
'ICERPS' OR CATEGORY = 'JCERPS' OR CATEGORY = 'MERPS' OR CATEGORY
'MERPS2' OR CATEGORY = 'STIEFEL SAP' OR CATEGORY = 'MOD CF') AN
((TO_DATE(TO_DATE('01/01/1970 00:00:00','MM/DD/YYYY HH24:MI:SS')
((LAST_UPDATED)/(86400)), 'DD/MM/YYYY HH24:MI:SS')) BETWEE
TO_DATE('13/11/2012 23:59:59','DD/MM/YYYY HH24:MI:SS') AN
TO_DATE('14/11/2012 23:59:59','DD/MM/YYYY HH24:MI:SS') )
Also, as a secondary and less important question, can I just have on
date? - i.e search for anything last updated since 14/11/12 for example
I currently have the below code which unfortunately for me means I nee
to update 2 dates (Last Updated dates). This is changed depending o
when I alst ran it. The reason I have this is because it is pulling dat
back from a database but needs to search in 2 places for this (they hav
different "TYPE" fields). At the moment I can only get it to bring bac
data for both by having a date search for both of them also. If I jus
have one at the end of the queryit searches for ALL CERPS BI and onl
filters the CERPS by the dates. I'm sure I just need to move som
brackets around somewhere but I can't figure it out. Any help is MUC
appreciated
1) TYPE = 'INFORMATION ANALYSIS APP' AND (CATEGORY = 'CERPS BI')
2) TYPE = 'MANUFACT AND SUPPLY CHAIN' AND (CATEGORY = 'BEBOP' O
CATEGORY = 'CERPS' OR CATEGORY = 'ICERPS' OR CATEGORY = 'JCERPS' O
CATEGORY = 'MERPS' OR CATEGORY = 'MERPS2' OR CATEGORY = 'STIEFEL SAP' O
CATEGORY = 'MOD CF')
from ARAdmin.GSK_INCIDENT where TYPE = 'INFORMATION ANALYSIS APP' AN
(CATEGORY = 'CERPS BI') AND ((TO_DATE(TO_DATE('01/01/197
00:00:00','MM/DD/YYYY HH24:MI:SS') + ((LAST_UPDATED)/(86400))
'DD/MM/YYYY HH24:MI:SS')) BETWEEN TO_DATE('13/11/201
23:59:59','DD/MM/YYYY HH24:MI:SS') AND TO_DATE('14/11/201
23:59:59','DD/MM/YYYY HH24:MI:SS') ) OR TYPE = 'MANUFACT AND SUPPL
CHAIN' AND (CATEGORY = 'BEBOP' OR CATEGORY = 'CERPS' OR CATEGORY
'ICERPS' OR CATEGORY = 'JCERPS' OR CATEGORY = 'MERPS' OR CATEGORY
'MERPS2' OR CATEGORY = 'STIEFEL SAP' OR CATEGORY = 'MOD CF') AN
((TO_DATE(TO_DATE('01/01/1970 00:00:00','MM/DD/YYYY HH24:MI:SS')
((LAST_UPDATED)/(86400)), 'DD/MM/YYYY HH24:MI:SS')) BETWEE
TO_DATE('13/11/2012 23:59:59','DD/MM/YYYY HH24:MI:SS') AN
TO_DATE('14/11/2012 23:59:59','DD/MM/YYYY HH24:MI:SS') )
Also, as a secondary and less important question, can I just have on
date? - i.e search for anything last updated since 14/11/12 for example