Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Verification on IIF() in SQL clause
Message
 
 
À
16/03/2003 11:47:29
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00766260
Message ID:
00766325
Vues:
26
>So, as the record for Type=2 was the first in Temp, that explains why it was acting like this. That might also explain why I never faced that situation before as I probably never encountered that specific scenario.

Yes, this would explain why you didn't have this problem in VFP7.

>I guess the best approach is to select only the New.Type field as is in the cursor and then apply a SCAN on that cursor to get specific evaluation.

If your udf is as simple as you showed in your first message, than you can combine
 IIF(New.Type=2,PADR(New.Url,250),;
  PADR(GetUrlArticleMagazine(New.Month,New.Year,New.Page,New.Type,New.Url),250) AS Url,;
* with
FUNCTION GetURLArticleMagazine2
PARAMETERS tnMonth,tnYear,tnPage,tnType,tcUrl
LOCAL lcURL
lcURL=''
IF tnType=2       && to account for that extra call to UDF
   lcURL=tcUrl    && This value doesn't make any diff because it'll never show up in result
ELSE
   lcURL='http://www.something...'
ENDIF
RETURN PADR(lcURL,250)
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform