Professional Documents
Culture Documents
select dSet.workflowid
,dSet.time
,dSet.FileName as InFile
,reverse(substr(outW.rText,1,instr(outW.rText,'/',1,1)-1)) as OutFile
,dSet.RecordSubType
,dSet.DetailText
from (Select w.workflowid
,w.createdate
,to_char(w.createdate,' hh:mi:ss am ') as time
,f4.FileName
,w.RecordSubType
,w.DetailText
--,outW.rText as tempOutFile
from workflowlog w
inner join
(select *
from (select *
from (select workflowid
,reverse(substr(FileName,1,instr(FileName,' ',1,1)
-1)) as FileName
from (select workflowid
,replace(reverse(substr(FileName,1,instr(FileNa
me,'.txt',1,1)+3)),'/',' ') as FileName
from (select workflowid
,CAST(DetailText AS VARCHAR2(1000)
) as FileName
from workflowlog
where createdate > sysdate -1
) f0
--change the file name below (keep the %
s)
where FileName like '%CR_014111_100439_CAMP_10
1220_142001.txt%'
and FileName not like '%AS_0%'
and FileName not like '%duplicate%'
) f1
) f2
group by workflowid
,FileName
) f3
) f4
on w.workflowid = f4.workflowid
--where DetailText not like '%FtpUploadProcess%'
) dSet
left outer join
(select workflowid
, reverse(cast(DetailText as varchar(200))) as rText
from workflowlog
where DetailText like'%.csv%'
and createdate > sysdate -1
) outW
on outW.workflowid = dSet.workflowid
order by dSet.WorkFlowID desc
,dSet.RecordSubType
select s.senddate,s.templateid,r.emailaddress,r.personid,r.firstname,r.lastname,
a.attribute1,a.attribute2,a.attribute3,a.attribute4,a.attribute5,a.attribute6,a.
attribute7,a.attribute8,a.attribute9,a.attribute10,a.attribute11,a.attribute12,a
.attribute13, s.LYRISMESSAGESETTINGSID
from LyrisMessageSettings s
join LyrisMessageRecipient r on s.LYRISMESSAGESETTINGSID = r.LYRISMESSAGESETTING
SID
join LyrisMessageRecipientAttribute a on a.LyrisMessageRecipientid = r.LyrisMess
ageRecipientid
where templateid like '%Outbound%'
and to_char( s.senddate,'mm/dd/yyyy') = to_char(sysdate,'mm/dd/yyyy')
order by s.senddate desc;
--retrieve Lyris extract data
select s.senddate,s.templateid,s.emailrequesttype,s.replyto,s.lookuprecipientinf
o,s.sendername,s.senderemailaddress,persontype,
r.emailaddress,r.personid,r.firstname,r.lastname,r.clientid,r.address1,r.address
2,r.city,r.state,r.zip,r.country,
a.attribute1,a.attribute2,a.attribute3,a.attribute4,a.attribute5,a.attribute6,a.
attribute7,a.attribute8,a.attribute9,a.attribute10,a.attribute11,a.attribute12,a
.attribute13, s.LYRISMESSAGESETTINGSID
from LyrisMessageSettings s
join LyrisMessageRecipient r on s.LYRISMESSAGESETTINGSID = r.LYRISMESSAGESETTING
SID
join LyrisMessageRecipientAttribute a on a.LyrisMessageRecipientid = r.LyrisMess
ageRecipientid
--where templateid like '%Feedback%'
--where templateid like '%Outbound%'
--and to_char( s.senddate,'mm/dd/yyyy') = to_char(sysdate,'mm/dd/yyyy')
order by s.senddate desc;
select * from workflowlog where workflowid = '8092' and detailtext like '%303165
943%';
select * from tblworkflowheaderproperty;
select * from customer where username = '555550021';
update tblworkflowheaderproperty set propertyvalue = '09/06/2010' where element
like '%FEEDBACK%';
commit;
select * from tblworkflowheaderproperty where element like '%FEEDBACK%' order by
workflowid desc;
Select tj.*,to_char(P.PROPERTYVALUE) as AS_OF_DATE from tblJobQueue tj
join tblworkflowheaderproperty p on p.workflowid = tj.workflowid and p.element
= 'AS_OF_DATE'
join tblworkflowheaderproperty p2 on p2.workflowid = tj.workflowid and p2.eleme
nt = 'FILETYPE' and to_char(p2.propertyvalue)='SEED'
order by tj.workflowid desc;
--login info qry
select px.plan_xsid,ap.description,lx.location_xsid,c.username,ea.attribute_valu
e as employee_id,cl.login_id,cl.login_password,ae.status as osda_status,c.firstn
ame,c.lastname,c.date_of_birth,a.email,LC.ORIG_HIRE_DATE,lc.adj_hire_date,ae.eli
gible as plan_entry_date,
PYC.CONTRIBUTION_YTD,ms.sourcename,LC.ANNUAL_SALARY,LC.YTD_HRS,LC.YEARS_SERVICE,
AE.ENABLED as plan_entry_status
from
accountenrollment ae
join accountlocations al on al.id = ae.accountlocation_id
left outer join participant_ytd_contri pyc on pyc.accountsourceid = ae.accounten
rollmentid and PYC.FIN_YEAR = 2010
left outer join accountsource asr on asr.accountsourceid = pyc.accountsourceid
left outer join mastersources ms on ms.mastersourcesid = asr.mastersourcesid
join location l on l.id = al.location_id
join employer e on e.id = l.employer_id
join customer c on c.customerid = ae.customerid
join employer_customer ec on ec.customerid = c.customerid and ec.employer_id = e
.id
left outer join customer_login cl on cl.parent_id = ec.employer_customer_id
join location_customer lc on lc.location_id = l.id and lc.customer_pk = c.pk
join address a on a.parentid=to_char(lc.location_customer_id) and a.parenttable
= 'LOCATION_CUSTOMER'
join extended_attribute ea on EA.PARENT_ID = to_char(lc.location_customer_id) an
d ea.attribute_type = 'CLIENT_EMPLOYEE_ID'
join locationxsmapping lx on lx.location_id = l.id
join accountsprovided ap on ap.accountsprovidedid = ae.accountsprovidedid
join planxsmapping px on px.accountsprovidedid = ap.accountsprovidedid
where
ae.status in( 'ELIGIBLE','ACTIVE', 'TERMED' )
--and cl.login_password = '1111111p'
--and ap.description = 'CALIFORNIA INSTITUTE OF TECHNOLOGY 457(B) DEFERRED COMP'
--and cl.login_id = 'CAL013055'
/*
and
(cl.login_id = 'CAL950276'
or cl.login_id = 'MV950266'
)
*/
and c.username = '654321123'
--c.username = '555555034'
--order by c.username,l.id,ae.accountenrollmentid
order by username desc
;
--!login info
-- Check address modified date
select a.* from LOCATION_CUSTOMER lc join ADDRESS a on (a.PARENTID = to_char(lc.
LOCATION_CUSTOMER_ID) and a.PARENTTABLE = 'LOCATION_CUSTOMER')
join CUSTOMER c on lc.CUSTOMER_PK = c.pk
where c.USERNAME = '303010476';
-- Set address modified date
update ADDRESS set modified = DATE '2010-08-30' where PARENTID =
(select to_char(lc.LOCATION_CUSTOMER_ID) from location_customer lc
join CUSTOMER c on lc.CUSTOMER_PK = c.pk
where c.USERNAME = '303010476');
commit;
-- feedback uses to determine whether a guy makes it into the file
select ae.*,c.PK as customerPK, lc.STATUS as lCustEmpStatus, lc.STATUS_EFFECTIVE
_DATE as lCustStatusEffDate from accountenrollment ae
-- This is to make sure if you've run the feedback the same day, you will reset
the ae flag to pick records again, here the date should be processing date of cu
rrent feedback
update accountenrollment ae set ae.feedback_included_date = null where ae.feedba
ck_included_date = to_date('12/21/2010', 'mm/dd/yyyy');
--Once your feedback has completed processing, IMMEDIATELY run this query and pa
ste the
--results here:
select workflowid, element, propertyvalue from tblworkflowheaderproperty
where workflowid = (select max(workflowid) from tbljobqueue
where processid = 24)
and element in
('CUTOFFDATE', 'LAST_CUTOFFDATE', 'FEEDBACK_DATE',
'LAST_FEEDBACK_DATE', 'PAYROLLDATE')
order by element asc;
--from Aleicia
--George asked me to distribute this since there are many test cases with eDocum
ents testing.
--As is, it selects all customer and eDocuments information for eDocuments ALREA
DY IN EXISTENCE.
--Edit accordingly for the different purposes you may use it for.
Select cu.*, cd.* --all customer data shown, all document data shown
From Customer Cu
Join Employer_Customer Ec On Ec.Customerid = Cu.Customerid
Join Customer_Document Cd On Cd.Employer_Customer_Id = Ec.Employer_Customer_Id
where
cd.method = 'EDELIVERY' --ONLY select eDocuments. Change to 'POST' or comment ou
t this line as necessary
and edelivery_id is not null --ONLY select customers for which a document alread
y exists
--and cu.username = '0000000000' --Uncomment this line to view a particular cust
omer and fill in the proper username/ssn
;