Hi,
I noticed that I can’t do sub queries in Teradata.
For example:
Select patient_name
Patient_age,
Patient_weight,
(Select Count(*) from drug_taken WHERE drug_name=”Warfarin” patient_id=10) CountWarfarin,
(Select Count(*) from drug_taken WHERE drug_name=”Heprin” patient_id=10) CountHeprin
FROM patient
WHERE patient_id=10
So what is the workaround for this? Where I don’t have to create a stored procedure.
Thank you,
-Tesh
I noticed that I can’t do sub queries in Teradata.
For example:
Select patient_name
Patient_age,
Patient_weight,
(Select Count(*) from drug_taken WHERE drug_name=”Warfarin” patient_id=10) CountWarfarin,
(Select Count(*) from drug_taken WHERE drug_name=”Heprin” patient_id=10) CountHeprin
FROM patient
WHERE patient_id=10
So what is the workaround for this? Where I don’t have to create a stored procedure.
Thank you,
-Tesh