Question
· Jan 12

Unable to create a table in SQL Explorer based on the select statement that joins multiple tables and to create a cube based on this table.

Hi Community,

I am attempting to create a new table by executing a SELECT statement that involves joining multiple tables. However, I encountered an error during execution: '( expected, AS found^Combined AS.' I would also like to create a cube based on this SQL table. However, during the cube creation process, I am prompted to specify a source class, and I'm unsure which class to use as it requires an existing class. Could you please help me identify the issue with the table creation, and provide guidance on selecting the appropriate source class for the cube creation?"

Feel free to let me know if you need further clarification or if you have additional questions!

CREATE TABLE HS.Combined
 WITH STORAGETYPE = COLUMNAR
AS SELECT d.DiagnosisGroup,
    d.EncounterNumber,
    d.Diagnosis_Code,
    d.Diagnosis_CodeSystemVersionId,
    d.Diagnosis_Description,
    d.DiagnosisType_Description,
    pr.HSAAProcedure_Code,
    pr.HSAAProcedure_SDACodingStandard,
    m.DrugProduct_Description,
    m.DrugProduct_SDACodingStandard,
    pa.Address_City_Code,
    pa.Address_City_Description,
    pa.Address_Country_Code,
    pa.Address_State_Code,
    pa.Address_State_Description,
    pa.Address_Street,
    pa.Address_Zip_Code,
    pa.ContactInfo_EmailAddress,
    pa.ContactInfo_MobilePhoneNumber,
    pa.Gender_Description,
    pa.Gender_Code,
    pa.Name_FamilyName
FROM HS.Patient pa
LEFT OUTER JOIN HS.Diagnosis d ON pa.ID = d.Patient
LEFT OUTER JOIN HS.HSAAProcedure pr ON pa.ID = pr.Patient
LEFT OUTER JOIN HS.Medication m ON pa.ID = m.Patient

Thanks in advance.

Product version: IRIS 2020.2
$ZV: HealthShare 2020.2 [HealthShare Modules: Active Analytics:20.0.8620 + Core:20.0.8620] - IRIS for UNIX (Red Hat Enterprise Linux for x86-64) 2020.1 (Build 217_1_20418U) Tue Nov 17 2020 15:48:44 EST
Discussion (1)1
Log in or sign up to continue