Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding LEFT function to a UDF function within SELECT
Message
De
08/10/2001 19:43:11
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Adding LEFT function to a UDF function within SELECT
Divers
Thread ID:
00565747
Message ID:
00565747
Vues:
40
I have a UDF called SECTIONS.
SELECT SECTIONS(st300.uid,'2000','FALL') FROM st300
gives me blanks, but
SELECT LEFT(SECTIONS(st300.uid,'2000,'FALL'),32) FROM st300
gives me the correct result (string).
Anybody knows why?

Here's the function:
FUNCTION SECTIONS(pUID,pYear,pSem)
LOCAL xRet, xTemp, xSS440
xRet=''
xSS440=zSS+'SS440' &&zSS is a global variable for path to SS files.

DO CASE
CASE UPPER(pSem)="FALL"
xSem='1'
CASE UPPER(pSem)="SPRING"
xSem='2'
CASE UPPER(pSem)="SUMMER"
xSem='0'
ENDCASE

*sts='S' means scheduled.
*List only scheduled sections.
SELECT sts,sec FROM &xSS440 ;
WHERE UID=pUID and sem=xSem and year=pYear and sts='S' ;
ORDER BY UID,per INTO CURSOR xTemp

GO TOP
DO WHILE NOT EOF()
IF EMPTY(xRet) THEN
xRet=str(sec,3)
ELSE
xRet=xret+','+str(sec,3)
ENDIF
SKIP
ENDDO

Return xRet
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform