Jump to content

How to retrieve data from query and link the data


Dominic85

Recommended Posts

something like that? SELECT Omim_NoFROM avWHERE Description LIKE '%LIVER%'ORDER BY Omim_No ASCSELECT Omim_NoFROM csWHERE CS_Description LIKE '%LIVER%'OR CS_DATA LIKE '%LIVER%'ORDER BY Omim_No ASCSELECT Omim_NoFROM tiWHERE Omim_Titles LIKE '%LIVER%'ORDER BY Omim_No ASCSELECT Omim_NoFROM ti_alt_titleWHERE Omim_Alt_Titles LIKE '%LIVER%'ORDER BY Omim_No ASCSELECT Omim_NoFROM txWHERE Omim_Text LIKE '%LIVER%'SELECT subsnp_id,pop_id,allele_idFROM AlleleFreqBySsPopWHERE source LIKE '%LIVER%'i want to search for the keywords, and display the result as in Omim_No and link the Omim_No to a table contain Omim number.. i got multiple tables.. some tables contain only number without words..

Link to comment
Share on other sites

your questions are very vague. Where is omim number?? What do you mean link to another table.What do you want to do (specificly) with the data returned from your select statement???

now i got multiple tables, and i need to search for a word in this multiple tables, and it will display the content or the discription from the tables. omim number is the number from the table that related to the word i search for. can u generate the code for mi? show an example.. thx..
Link to comment
Share on other sites

can anyone help mi with this? how to add more tables ? now i got 2 tables join together what if i want tojoin more tables, how should i do? add command on which line?

SELECT av.Omim_NoFROM avINNER JOIN csON av.Omim_No=cs.Omim_NoWHERE av.Description LIKE '%LIVER%'OR cs.CS_Description LIKE '%LIVER%'

Link to comment
Share on other sites

now i got multiple tables, and i need to search for a word in this multiple tables, and it will display the content or the discription from the tables. omim number is the number from the table that related to the word i search for. can u generate the code for mi? show an example.. thx..

Based on this code you posted
SELECT av.Omim_NoFROM avINNER JOIN csON av.Omim_No=cs.Omim_NoWHERE av.Description LIKE '%LIVER%'OR cs.CS_Description LIKE '%LIVER%'
And if you want to display the description to the screen you will have to do this
SELECT av.Description,cs.CS_DescriptionFROM avINNER JOIN csON av.Omim_No=cs.Omim_NoWHERE av.Description LIKE '%LIVER%'OR cs.CS_Description LIKE '%LIVER%'

in order to add more tables do this.

SELECT av.Description,cs.CS_Description,nt.descriptionFROM avINNER JOIN csON av.Omim_No=cs.Omim_NoINNER JOIN newTable ntON av.Omim_No = nt.Omim_No  -- assuming newTable has Omim_NoWHERE av.Description LIKE '%LIVER%'OR cs.CS_Description LIKE '%LIVER%'OR nt.description LIKE '%LIVER%'

Link to comment
Share on other sites

i have done it.. is this correct?

SELECT av.Omim_No,snp_idFROM avINNER JOIN csON av.Omim_No=cs.Omim_NoINNER JOIN ti ON cs.Omim_No=ti.Omim_NoINNER JOIN ti_alt_titleON ti.Omim_No=ti_alt_title.Omim_NoINNER JOIN txON ti_alt_title.Omim_No=tx.Omim_NoINNER JOIN OmimVarLocusIdSNPON tx.Omim_No=OmimVarLocusIdSNP.omim_idWHERE av.Description LIKE '%LIVER%'OR cs.CS_Description LIKE '%LIVER%'OR ti.Omim_Titles LIKE '%LIVER%'OR ti_alt_title.Omim_Alt_Titles LIKE '%LIVER%'OR tx.Omim_Text LIKE '%LIVER%'

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...