Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Create SQL View (embed variable) best way q
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01301700
Message ID:
01301767
Vues:
13
>>
   Text To lcSqlStr TEXTMERGE NOSHOW
   Create SQL View <<c_o_v>> Remote Connection <<c_c>> As Select Patient.PATIENT_ID,;
         Patient.SSN, Patient.SEX_C, Patient.DOB,;
         Patient.ETHNIC_ORIGIN_C, Patient.RACE_C, Pat_admission_status.EPISODE,;
         Pat_adm_hist.ADM_PADM_DATE, Pat_adm_hist.ADM_TYPE_C,;
         Pat_adm_hist.FACILITY_ID, Pat_adm_hist.FACILITY_CHART_NUM,;
         Pat_admission_status.ADMIT_DATE, Pat_admission_status.DISCHARGE_DATE,;
         Pat_admission_status.PROGRAM_C, Adm_legal_status.LEGAL_UID,;
         Adm_legal_status.LEGAL_STATUS_C, Adm_legal_status.EFFECTIVE_DATE From ;
         <<c_Patient>> Patient,<<c_Pat_Adm>> Pat_admission_status,<<c_Pat_Hist>>;
          Pat_adm_hist,<<c_LS>> Adm_legal_status Where Pat_admission_status.PATIENT_ID =;
         Patient.PATIENT_ID And Pat_admission_status.FACILITY_ID = Patient.FACILITY_ID;
         And Pat_adm_hist.PATIENT_ID = Pat_admission_status.PATIENT_ID;
          And Pat_adm_hist.FACILITY_ID = Pat_admission_status.FACILITY_ID;   
          And Adm_legal_status.PAT_ADM_HIST_UID = Pat_adm_hist.PAT_ADM_HIST_UID;
          And Adm_legal_status.FACILITY_ID = Pat_adm_hist.FACILITY_ID;
          And Patient.FACILITY_ID = ;
        Pat_admission_status.FACILITY_ID And Pat_admission_status.EPISODE = Pat_adm_hist.EPISODE;
         Order By Patient.SSN, Patient.PATIENT_ID, Pat_admission_status.EPISODE,;
         Adm_legal_status.LEGAL_UID, Pat_adm_hist.FACILITY_ID
   EndText
>>
>>Macro substitution sadly does not work and the string length is too long for concat process.
>>How would you create my view with my vars?
I need to have a macro lcSqlStr - do I need to create a temporary file, if so, how do I exec it?

Naomi indicates that VFP6 doesn't have Text To, so, what is the VFP6 way to run view?
TIA
Edgar L. Bolton, B.S. B.B.A.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform