Can anyone help me create a sql querry with the following clipper/dbase code
or help me understand what the hell it means???
If you can help please don't hesitate to contact me at
ma***********@magma.ca.
remove the NOSPAM from my e-mail.
Thanks in advance to all of you that take the time to look at this post!!
Here is the code:
STATIC FUNCTION Termination
@ ++nL,01 SAY 'Terminations: '
SELECT 2
SET INDEX TO ( 'j:\files\hris\'+cPrevHRIS+'si' )
SELECT 3
SET INDEX TO ( 'j:\files\hris\st'+cStaff+'sin' )
SET FILTER TO END # CTOD('')
SELECT 1
SET INDEX TO
SET RELATION TO SIN INTO ( cPrevHRIS ), SIN INTO ( 'st'+cStaff )
SET FILTER TO END # CTOD('') .AND. RIGHT(TYPE,3) = 'REG' .AND. ;
2->END = CTOD('') .AND. 3->(EOF())
COPY TO ( 'f:\files\dbval\terminat' )
IF !OpenFiles({{ 15, { 'f:\files\dbval\terminat' }, 'Terminations', .T.,
0 }})
BREAK
ENDIF
SET RELATION TO SIN INTO ( 'dldm' )
DELETE FOR 11->(FOUND())
PACK
REPLACE LEVEL WITH SearchDl( SIN ) ALL
@ nL,30 SAY LASTREC() PICT '99,999'
USE
SELECT 3; SET INDEX TO; SET FILTER TO
SELECT 2; SET INDEX TO
SELECT 1; SET RELATION TO; SET FILTER TO
RETURN NIL