sql - Select result from multi tables with joins -
i have query. want select
surgery type
surgery details
modality id
am on right path atleast?
the link
table middle of everything
addmission
1tom onlink
surgery
mto1 onlink
modality
mto1 onlink
my problem add in modality.id
result.
skip modality, , query works 100%
updated (dropped multi alias)
select surg.srg_details, surg.type, modd.id surgery surg join link lnk on lnk.lnk_id = surg.srg_lnkid join modality modd on modd.mod_lnkid = lnk.lnk_id join admission adm on adm.adm_id = lnk.lnk_admid adm.adm_id = 192100042
try use in case:
select surg.srg_details, surg.type, mod.id surgery surg, modality mod join link lnk on lnk.lnk_id = surg.srg_lnkid join admission adm on adm.adm_id = lnk.lnk_admid adm.adm_id = 192100042 , surg.srg_lnkid = mod.mod_lnkid
Comments
Post a Comment