Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Strange SQL ICASE or IIF Behaviour
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Strange SQL ICASE or IIF Behaviour
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01383962
Message ID:
01383962
Vues:
106
Have observed some strange behaviour when setting up a View with the following Syntax:

SELECT ICASE(Tasks.t_assgn_by = ?vp_rem_emp, "TaskA", Tasks.t_assgn_to = ?vp_rem_emp, "TaskB", "TaskN" ) As TType,;
Tasks.t_id, Tasks.t_assgn_by, Tasks.t_assgn_to;
FROM km!tasks;
WHERE INLIST(?vp_rem_emp, Tasks.t_assgn_by, Tasks.t_assgn_to, 1) = .T.

If a Public Variable vp_rem_emp has not been set up, The Error: SQL: Column "field | variable" is not found (Error 1806) for vp_rem_emp occurs.

Setting up a Variable in the calling program (or Public if creating the View) seems to "trick" the View into working as desired.

(In this example, t_d, t_assign_by, t_assgn_to are all Integer Fields. Don't think Field types matter.)

Same Error appears regardless of SET ENGINEBEHAVIOR settings and also appears to occur for IIF Function.

Anyone dealt with this type of issue?
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform