Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help. I think my view designer is screwing up.
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00424003
Message ID:
00424039
Vues:
17
>>Can you post SQL SELECT statement of that view?
>
>Thanks you Vlad and John.
>here the sql created by the view designer.
>
>SELECT Price.*, Service.desc, Garment.desc;
> FROM clnrware!price INNER JOIN clnrware!service;
> INNER JOIN clnrware!garment ;
> ON Price.garment = Garment.id ;
> ON Price.service = Service.id;
> WHERE Price.service = ?pv_service;
> AND Price.garment = ?pv_garment

First rearrange the SQL as:

SELECT Price.*, Service.desc, Garment.desc;
FROM clnrware!price ;
INNER JOIN clnrware!service;
ON Price.service = Service.id;
INNER JOIN clnrware!garment ;
ON Price.garment = Garment.id ;
WHERE Price.service = ?pv_service;
AND Price.garment = ?pv_garment

second, create this view in code

CREATE SQL VIEW myView AS ;
SELECT Price.*, Service.desc, Garment.desc;
FROM clnrware!price ;
INNER JOIN clnrware!service;
ON Price.service = Service.id;
INNER JOIN clnrware!garment ;
ON Price.garment = Garment.id ;
WHERE Price.service = ?pv_service;
AND Price.garment = ?pv_garment

VFP native View Designer is not good when you join more that 2 tables.
You can us eErik Moore's eView also.
If you create this view in code, do not try to open it in the View Designer anymore.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform