Hi all,
Getting a problem in writing an sql query. two tables:
1st: created patient table 2nd: already created doc table patientid patientname docid workstatus docid docname 1 aaa 2 10 1 ggg 2 bbb 2 20 2 hhh 3 ccc 1 10 3 iii 4 ddd 3 10 5 eee 3 20 6 fff 2 10
expected output:
docname workstatus(10) workstatus(20) ggg 1 0 hhh 2 1 iii 1 1
can also use temporary tables between the queries
Thanks in advance