Is there any way to create Optimazible VFP local view. Current definition of the view is:
CREATE SQL VIEW HonVed AS SELECT Hon.*, Homo.Ime;
FROM honorar!hon LEFT OUTER JOIN honorar!homo ON Hon.egn = Homo.egn+;
WHERE Hon.dataved = ?getdataved+;
AND IIF(hon_ved1,Hon.lev1==?get_lev1,.T.) = .T.+;
AND IIF(hon_ved2,Hon.lev2==?get_lev2,.T.) = .T.+;
AND IIF(hon_ved3,Hon.lev3==?get_lev3,.T.) = .T.
I want this view to be optimazible
User can change values of the hon_ved1,2,3
How to Index Hon when some fields (Lev1, Lev2, Lev3) can contains Data # 0 but not take part in the view?
i.e. Lev1 can contains Data # 0 but hov_ved1 can be .F. etc. so I can't index my Table (hon) on
INDEX ON DTOS(DataVed)+STR(Lev1)+STR(Lev2)+STR(Lev3).
Is there another way to make this View optimazable instead each time the user change values of hon_ved1,2,3 I regenerate the View?
TIA
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.