Commit Graph

4 Commits

Author SHA1 Message Date
Marius
9f7e9779d2 Optimize scrie_jc_2007: Replace long MERGE with BULK COLLECT cursor loop
- Replaced 1,886-line MERGE statement with cursor loop + BULK COLLECT to avoid Oracle XE internal bugs with very long MERGE statements
- Reduced code size from 1,925 to 1,861 lines (-64 lines, -3.3%)
- Benefits:
  * Single SELECT execution (data loaded into PGA memory via BULK COLLECT)
  * Zero temporary table writes
  * Minimal PL/SQL overhead (~30-50ms for <10k rows)
  * Uses c_source%ROWTYPE for automatic structure adaptation
  * Preserves original alias 'S' for consistency
  * Maintains exact logic: UPDATE → DELETE (if nStergere + all zeros) → INSERT
- Added backup file: scrie_jc_2007_original_merge_backup.sql
- Added reusable transformation script: merge_to_bulk_collect.py

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-01 16:49:46 +03:00
Marius
b83983b6ed scrie jtva 2025-09-23 11:32:03 +03:00
Marius
f2880f1ef7 Update system prompt and create D300 migration script
- Enhanced system_prompt.md with mandatory initial questions, explicit examples, operation types, error handling, and BEGIN/END structure requirements
- Created ff_2025_09_10_01_CONTABILITATE_D300.sql migration script for DECONTTVA table with DELETE/INSERT approach
- Removed obsolete files: CLAUDE.md, README.md, CSV input files
- Updated input/scrie_jc_2007.sql

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-10 15:45:46 +03:00
Marius
865052597a scrie_jc 2025-08-19 14:27:23 +03:00