>*-* These have been tried with and without the WHERE clause to no availe
>*-* This and the next two tables are the ones that VFP claims have been changed
>&& Military table, 1:1 to master
> CREATE SQL VIEW military REMOTE ;
> CONNECTION pers_data SHARE ;
> AS SELECT Military.SEQUENCE_, Military.PMAIN_SEQ, Military.ELECT_SEQ,;
> Military.OLANG1, Military.OLANG2, Military.PLANG, Military.SLANG, Military.REL_SEQ;
> FROM persdat.MILITARY Military;
> WHERE Military.PMAIN_SEQ = Master.Sequence_
Need to include Master table in the FROM clause. Is there something else missing from the where clause? You are joining 2 tables but not selecting anything from the Master table, nor are you filtering the results set based on some value in the Master table. The WHERE clause as written is not needed. Do not join 2 tables unless you are selecting fields from the 2nd table or are using some data value from the 2nd value to filter the results set.
Plus, I would not name the view the same as the table you are selecting from. call it something like v_military, military_view, etc.
> && Meds table, 1:1 to master
> CREATE SQL VIEW meds REMOTE ;
> CONNECTION pers_data SHARE ;
> AS SELECT Meds.SEQUENCE_, Meds.PERS_SEQ, Meds.MED_DATE, Meds.VISION,;
> Meds.COLOUR, Meds.HEARING, Meds.GEOGRAPHICAL, Meds.AIR_FACTOR,;
> Meds.LUPDATE, Meds.RTEST_DATE, Meds.OCCUPATIONAL;
> FROM persdat.MEDS Meds ;
> WHERE Meds.pers_seq = master.sequence_
>
Same comment as above. WHERE clause as written is not needed.
> && CFExpress, 1:1 to master
> CREATE SQL VIEW cfexpress REMOTE ;
> CONNECTION pers_data SHARE ;
> AS SELECT Cfexpress.SEQUENCE, Cfexpress.PERS_SEQ, Cfexpress.TEST_DATE, Cfexpress.STATUS;
> FROM persdat.CFEXPRESS Cfexpress ;
> WHERE Cfexpress.pers_seq = master.sequence_
Same comment as above. WHERE clause as written is not needed.
>CREATE SQL VIEW perslang REMOTE ;
> CONNECTION pers_data SHARE ;
> AS SELECT Perslang.SEQUENCE, Perslang.LANG_SEQ, Perslang.ABILITY, perslang.TESTDATE;
> FROM persdat.PERSLANG Perslang ;
> WHERE perslang.sequence = military.PLANG
Same comment as above. WHERE clause as written is not needed.
>CREATE SQL VIEW perslang1 REMOTE ;
> CONNECTION pers_data SHARE ;
> AS SELECT Perslang.SEQUENCE, Perslang.LANG_SEQ, Perslang.ABILITY, perslang.TESTDATE;
> FROM persdat.PERSLANG Perslang ;
> WHERE perslang.sequence = military.SLANG
Same comment as above. WHERE clause as written is not needed.
>CREATE SQL VIEW Dependant_view REMOTE ;
> CONNECTION pers_data SHARE ;
> AS SELECT Dependant_view.SEQUENCE_, Dependant_view.PERS_KEY,;
> Dependant_view.SPF_NAME, Dependant_view.SPS_SIN_NUM,;
> Dependant_view.YOB, Dependant_view.RELATE_SEQ,;
> Dependant_view.SP_LANAME, Dependant_view.STREET, Dependant_view.CITY,;
> Dependant_view.P_CODE, Dependant_view.PHONE, Dependant_view.REL_CODE,;
> Dependant_view.REL_NAME, Dependant_view.SEX;
> FROM persdat.DEPENDANT_VIEW Dependant_view ;
> WHERE Dependant_view.PERS_KEY = master.SEQUENCE_
Same comment as above. WHERE clause as written is not needed.
>CREATE SQL VIEW Vehicles REMOTE ;
> CONNECTION pers_data SHARE ;
> AS SELECT Vehicles.SEQUENCE_, Vehicles.LIC_NUM, Vehicles.MODEL,;
> Vehicles.VEH_COLOUR, Vehicles.PROV_REG, Vehicles.PERS_SEQ, Vehicles.MAKE;
> FROM persdat.VEHICLES Vehicles ;
> WHERE Vehicles.PERS_SEQ = Master.SEQUENCE_
Same comment as above. WHERE clause as written is not needed.
Mark McCasland
Midlothian, TX USA