MS SQL Server 2008.
I have two tables:
One of Operations and one for Eyes.
For every row in Operations there are two rows in Eyes (left and right!)
Operation table has:
Eyes table has
Eye_id (1 or 2)
I would like to return a dataset that has the following:
Pat_id, Operation_date, Visus_Left, Visus_Right, Approved
Note that visus left is when Eye_id = 1 and visus_right is when Eye_id = 2
Can anyone write me the sql?