Scenario

Patients who visit a health care provider need to provide their contact information and medical history information. This detail is created when the patient first approaches the provider. When a returning patient visits the health care provider again, his personal information and past and current medical details are retrieved.

Operation

Use SQL/XML queries to fetch patient data.


The example here shows that XMLQUERY is an SQL scalar function that enables you to execute an XQuery expression from within an SQL context.

Solution

Patients information and his medical history in XML are retrieved.

Best Practices