Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
>>>Thanks for such a quick response Sergey. The view has three tables. The first two are connected with an Inner Join with the primary key in the first table. The second and third tables are connected with a Left out Join. The parameter is public variable. Let me know if you need more.
>>
>>Can you post SQL for the view
>
>
>SELECT Company.orgname, Company.statecorpi, Company.stateoforg,;
> Company.fiscyrend, Company.orgdate, Company.citybuslic,;
> Company.countybusl, Company.statebusli, Licenses.licenseid,;
> Licenses.companyid, Licenses.code, Licenses.filingfee, Licenses.statetax,;
> Licenses.agency, Licenses.address1, Licenses.address2, Licenses.city,;
> Licenses.postal, Licenses.county, Licenses.country, Licenses.phone,;
> Licenses.internatio, Licenses.intadd, Licenses.type, Licenses.dt1,;
> Licenses.dt2, Licenses.dt3, Licenses.dt4, Licenses.dt5, Licenses.dt6,;
> Licenses.dt7, Licenses.dt8, Licenses.dt9, Licenses.dt10, Licenses.dt11,;
> Licenses.dt12, Cmstates.state, Licenses.citylic, Licenses.countylic,;
> Licenses.statelic, Licenses.foreignlic, Licenses.otherlic,;
> Licenses.dtype, Licenses.taxidno, Company.companyid, Cmstates.code,;
> Company.stateofind,;
> IIF(Licenses.dtype=1,Licenses.dt4,IIF(Licenses.dtype=2,Licenses.dt5,IIF(Licenses.dtype=3,Licenses.dt2,IIF(Licenses.dtype=4,Licenses.dt1,DATE())))) AS firstdt,;
> PADR(IIF(Licenses.dtype=1,"Annual",IIF(Licenses.dtype=2,"Semiannual",IIF(Licenses.dtype=3,"Quarterly",IIF(Licenses.dtype=4,"Monthly","No Data")))),12) AS datetype;
> FROM ;
**************************
It’s perplexing is that that .requery('Buslic') doesn’t work in the program but when progress is stopped just prior and =requery('Buslic') is put in the command window it works as expected. I would think that there shouldn’t be any difference between the two when they are implemented at exactly the same point but apparently there is.
> nch_mgr!company ;
> INNER JOIN nch_mgr!licenses ;
> ON Company.companyid = Licenses.companyid ;
> LEFT OUTER JOIN nch_mgr!cmstates ;
> ON Licenses.code = Cmstates.code;
> WHERE Company.companyid = ( ?zcompany );
> ORDER BY Company.orgname, Licenses.licenseid
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement