Question
· Jun 9, 2020

Cache SQL question

I have a table with 4 column: MRN (primary key), Name, DOB, and Gender. I want to bring in the values on all of the columns into a DTL. Currently, I declare variables for each of the columns and using 3 select statements.

  &sql(SELECT Name INTO :Name FROM osuwmc_RQGPatient.DataTable WHERE MRN=:MRN)

  &sql(SELECT DOB INTO :DOB FROM osuwmc_RQGPatient.DataTable WHERE MRN=:MRN)

  &sql(SELECT Gender INTO :Gender FROM osuwmc_RQGPatient.DataTable WHERE MRN=:MRN)

Is there a way to do this in a single select statement?

Discussion (4)1
Log in or sign up to continue