Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Update
Message
De
16/08/2019 19:31:27
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
01670137
Message ID:
01670138
Vues:
78
This message has been marked as the solution to the initial question of the thread.
>Hi,
>
>Could someone, please, explain why I am getting an error. What I am doing is updating from one cursor to another.
>The SQL Update that works is as follows:
>
>Update (tcCursorName) set week_no = S.week_no, week_fr = S.MON_WK_FR, week_to = S.MON_WK_TO ;
>	 from (tcBatchUpdCursor) S where EVALUATE(tcCursorName + ".TASK_NO") = S.TASK_NO 
>
>No problem above.
>
>But when I add to the WHERE clause another condition, I get error "Object PM_SCHED is not found" The PM_SCHED is the value of the tcCursorName (that cursor that is being updated)
>
>
>Update (tcCursorName) set week_no = S.week_no, week_fr = S.MON_WK_FR, week_to = S.MON_WK_TO ;
>	 from (tcBatchUpdCursor) S where EVALUATE(tcCursorName + ".TASK_NO") = S.TASK_NO 
>        AND EVALUATE( tcCursorName + ".eqpmsch.pk" ) > 0
>
>
>What am I dong wrong in the second SQL Update?
>
>TIA

If the last clause of the WHERE is referencing a column in tcCursorName, the expression has two dots, which is not allowed. Maybe it should be
AND EVALUATE( tcCursorName + ".eqpmsch_pk" ) > 0
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform