Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE Cursor delete_cursor(salesno c(6), release_number c(3))
- SELECT table1
- GOTO TOP
- **lcsono** = table1.salesno
- **lcrelease** = table1.release_number
- GOTO 2
- SCAN REST
- ** In VFP, semi-colon is continuation of command
- IF table1.salesno == lcsono ;
- AND table1.release_number <> "000";
- AND lcrelease = "000"
- SELECT delete_cursor
- APPEND BLANK
- REPLACE table1.salesno WITH lcsono
- REPLACE table1.release_number WITH lcrelease
- SELECT table1
- ENDIF
- **lcsono** = table1.salesno
- **lcrelease** = table1.release_number
- ENDSCAN
- SELECT delete_cursor
- INDEX on ALLTRIM(delete_cursor.salesno) + ALLTRIM(delete_cursor.releaseno);
- TAG tagdelete
- SELECT table1
- GOTO TOP
- SCAN
- IF SEEK(ALLTRIM(table1.salesno) + ALLTRIM (table1.salesno), ;
- "delete_cursor", "tagdelete")
- REPLACE table1.delflag WITH "Y"
- ENDIF
- ENDSCAN
- DECLARE CURSOR @fsono char(6)
- update table1.salesno Set
- table1.salesno = @fsono
- where
- @fsono = table1.salesno
- AND table1.release_number <> "000"
- AND lcrelease = "000"
- DECLARE CURSOR @release char(6)
- update table1.release_number Set
- table1.release_number = @release
- where
- @fsono = table1.salesno
- AND table1.release_number <> "000"
- AND @release = "000"
Add Comment
Please, Sign In to add comment