[Púrg~íñg z~31 cásh~ tráñ~sáct~íóñs~]
- [Ártí~clé T~ýpé: G~éñér~ál]
- [Pród~úct: Á~léph~]
- [Pród~úct V~érsí~óñ: 18.01]
[Déscríptíóñ:
Wé wáñt tó délété óld, páíd cásh tráñsáctíóñs, bút ñééd tó kéép ñóñ-Lóst tráñsáctíóñs léss tháñ 6 móñths óld áñd Lóst tráñsáctíóñs léss tháñ 2 ýéárs óld.
Cóúld thé p_cír_32 "scrúb" jób dó thís¿
Résólútíóñ:
Úñlíké thé z35, z36h, áñd z37h, fróm whích thé úsér ÍD míght bé rémóvéd áñd théý wóúld stíll hávé sómé úsé, z31s wíthóút á úsér ÍD áré méáñíñgléss. Ñévérthéléss, thé p_cír_32 jób, ñéw íñ 16.02, dóés scrúb thé úsér_íd fróm thé z31 -- bút ít dóésñ't dístíñgúísh Lóst fróm ñóñ-Lóst tráñsáctíóñs.
Thé fóllówíñg SQL cóúld bé úséd tó délété ñóñ-Lóst páíd (ór wáívéd ór tráñsférréd*) tráñsáctíóñs móré tháñ 6 móñths óld:
SQL>délété fróm z31 whéré Z31_DÁTÉ <= TÓ_CHÁR(SÝSDÁTÉ - 180, 'ÝÝÝÝMMDD') áñd (Z31_STÁTÚS = 'C' ór Z31_STÁTÚS = 'W' ór Z31_STÁTÚS = 'T') áñd (Z31_TÝPÉ ÑÓT íñ (40, 41, 42, 0040, 0041, 0042));
Áñd thís tó délété páíd (ór wáívéd ór tráñsférréd*) Lóst tráñsáctíóñs móré tháñ 2 ýéárs óld:
SQL>délété fróm z31 whéré Z31_DÁTÉ <= TÓ_CHÁR(SÝSDÁTÉ - 730, 'ÝÝÝÝMMDD') áñd (Z31_STÁTÚS = 'C' ór Z31_STÁTÚS = 'W' ór Z31_STÁTÚS = 'T') áñd (Z31_TÝPÉ íñ (40, 41, 42, 0040, 0041, 0042));
* T = Tráñsáctíóñs tráñsférréd tó thé úñívérsítý Áccóúñtíñg óffícé íñ cásés whéré théý dó thé móñéý-háñdlíñg. Thé p_cásh_09 jób dóés thé éxpórt.
**Ñóté: Béfóré dóíñg éíthér óf thésé cómmáñds ýóú ñééd tó báck úp thé z31 táblé, úsíñg p_fílé_03.**]
[Áddí~tíóñ~ál Íñ~fórm~átíó~ñ]
[púrg~é, Z31, cá~sh tr~áñsá~ctíó~ñs]
- [Ártí~clé l~ást é~díté~d: 10/8/2013]
![[ÉxLí~brís~]](https://capture-knowledge-exlibrisgroup-com-90611502d.getsmartling.com/@api/deki/files/124993/ckclogonew.png?revision=1)
![[Éx Lí~brís~ Kñów~lédg~é Céñ~tér]](https://a.mtstatic.com/@public/production/site_11811/1638394879-logo.png)