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:
01301704
Vues:
12
You can use TEXTMERGE. See corrections inline

>What is the best way to do something like this...

>
TEXT TO lcSqlStr TEXTMERGE NOSHOW
   Create SQL View (<<Var1>>) Remote Connection (<<var2>>) 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 ;
>         (var3) Patient,(var4) Pat_admission_status,(var5);
>          Pat_adm_hist,(var6) 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
&lcSqlStr 
>
>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?
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform