Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL VIEWS and strange behavior
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Titre:
SQL VIEWS and strange behavior
Divers
Thread ID:
00502655
Message ID:
00502655
Vues:
54
Hello, firstable i use eview.app not view designer, now i want make 3 tables for 1 view, the strange behavior is when open for first time send me a error message: the column 'iid' not found, well here is the code:

CREATE SQL VIEW "LV_STORAGE" ;
AS SELECT Storage.iid, Storage.cdescrip, Storage.iprocessid, Storage.nqueuingorder, Bizrules.iId AS "iBizRulesId",Bizrules.regla, Storage_queue.iStorageId,Storage_queue.ncapacity FROM ofertas!storage LEFT OUTER JOIN ofertas!storage_queue LEFT OUTER JOIN ofertas!bizrules ON Storage.iid = Bizrules.iid ON Storage.iid= Storage_queue.istorageid AND Bizrules.objecttype = "storage" WHERE Storage.iid = ?vp_storage

BUT when remove LEFT OUTER JOIN for this code:

CREATE SQL VIEW "LV_STORAGE" ;
AS SELECT Storage.iid,Storage.cdescrip, Storage.iprocessid, Storage.nqueuingorder, Bizrules.iId AS "iBizRulesId",Bizrules.regla, Storage_queue.iStorageId,Storage_queue.ncapacity FROM ofertas!storage,ofertas!storage_queue ,ofertas!bizrules WHERE Storage.iid = Bizrules.iid AND Storage.iid= Storage_queue.istorageid AND Bizrules.objecttype = "storage" AND Storage.iid = ?vp_storage

dont send me errors, but i dont have any line (because Storage_queue is empty), in the first SQL send me and error, but when i try again, works with one register, in the second case dont send me error but dont send me nothing

i am lost, what i make wrong?

thats the table strucs:

table bizrules
iid integer Key
Objecttype character 10
cdescrip character 20
regla Memo

table storage
iid integer key
cdescrip character 30
iprocessid integer
ncapacity n (2)
nqueuigorder n(3)
ibizrules integer


table storage_queue
istorageid integer
ncapacity n(3)

the main table is storage

thanks in advance

Francisco Morosini
Répondre
Fil
Voir

Click here to load this message in the networking platform