General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
>>I have one view that is built by a selection from another view.
>>randomly, I get this error "view definition has been changed". of course, the view did not change at all.
>>is this a bug in VFP8?
>>is there a work around it?
>>I already tried to close then open the view and still get the same problem.
>>
>>I have no UNION in the view.
>>It does not update anything.
>>
>>Thanks
>>Mo
>
>Can you post SQL Select for both views?
Hi Sergey
I noticed that I start getting teh error after I added the IIF() in the second views.
OK, the select part only, View 1
-----
SELECT System.sysname, Vul.vulname, Grp.grpname, Threat.thrname, Cm.cmname,;
S_cm.cmflag, S_cm.cmpro, S_cm.cmreq,;
ROUND((grpval*(harmony/100))*thrfreqval,0) AS ale_max, Link_24.cmref,;
System.sysid, S_grp.grpref, S_grp.grpval, S_vul.vulref, S_vul.vullevel,;
S_vul.vullevelp, S_vul.vullevel1, S_vul.vulwtot, S_threat.thrref,;
S_threat.thrfreq, S_threat.thrfreqval, Link_23.harmony,;
ROUND((grpval*((vullevel-vullevel1)/100)*(harmony/100))*thrfreqval,0) AS ale_cur_old,;
ROUND((grpval*((vullevel-(vullevelp+vullevel1))/100)*(harmony/100))*thrfreqval,0) AS ale_pro_old,;
Cm.cmweight, S_cm.cmqweight, Cm.cmcost2p, Cm.cmcost2i, Cm.cmcost2m,;
Cm.cmlifecyc, Link_24.closefac,;
ROUND((((Cm.cmweight+S_cm.cmqweight)*Link_24.closefac)/100)/S_vul.vulwtot*89,0) AS cmfirstweight;
FROM ;
View 2
-------
SELECT IIF((cmflag.AND..NOT.cmpro),ROUND((grpval*((cmfirstweight)/100)*(harmony/100))*thrfreqval,0),0.0000) AS ale_cur,;
IIF((cmflag.AND.cmpro),ROUND((grpval*((cmfirstweight)/100)*(harmony/100))*thrfreqval,0),0.0000) AS ale_imp,;
IIF((.NOT.cmflag.AND.cmpro),ROUND((grpval*((cmfirstweight)/100)*(harmony/100))*thrfreqval,0),0.0000) AS ale_pro,;
IIF((.NOT.cmflag.AND..NOT.cmpro),ROUND((grpval*((cmfirstweight)/100)*(harmony/100))*thrfreqval,0),0.0000) AS ale_non,;
ROUND(cmfirstweight/100,2)*ale_max AS cmfinalweight, Q_risk_ale3.*;
FROM ;
VIew1;
ORDER BY VIew1.vulname, VIew1.grpname,;
VIew1.thrname, VIew1.cmref
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only