Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Update
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
SQL Update
Miscellaneous
Thread ID:
01670137
Message ID:
01670137
Views:
55
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
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Next
Reply
Map
View

Click here to load this message in the networking platform