Showing posts with label tablessecond. Show all posts
Showing posts with label tablessecond. Show all posts

Friday, February 24, 2012

How to retrieve data from query and link the data??

first thing is how to search the keywords from the tables
Second thing after u search the result ,how to link the result to a number
related to the result?can u send mi the code by e mail? futaba2@.hotmail.com thx alot..|||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_No
FROM av
INNER JOIN cs
ON av.Omim_No=cs.Omim_No
WHERE av.Description LIKE '%LIVER%'
OR cs.CS_Description LIKE '%LIVER%'|||CAN SOMEONE PLS HELP ME!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!|||See if this helps
CREATE TABLE #Test (Omim_No INT)
GO
INSERT INTO #Test SELECT Omim_No
FROM
(
SELECT Omim_No
FROM av
WHERE Description LIKE '%LIVER%'
UNION ALL
SELECT Omim_No
FROM cs
WHERE CS_Description LIKE '%LIVER%'
OR CS_DATA LIKE '%LIVER%'
UNION ALL
SELECT Omim_No
FROM ti
WHERE Omim_Titles LIKE '%LIVER%'
UNION ALL
SELECT Omim_No
FROM ti_alt_title
WHERE Omim_Alt_Titles LIKE '%LIVER%'
UNION ALL
SELECT Omim_No
FROM tx
WHERE Omim_Text LIKE '%LIVER%'
UNION ALL
SELECT subsnp_id,pop_id,allele_id
FROM AlleleFreqBySsPop
WHERE source LIKE '%LIVER%'
) AS Der
--JOIN
SELECT * FROM #Test JOIN Table
ON #Test.Omim_No=Table.Omim_No
"SQL noob" <SQLnoob@.discussions.microsoft.com> wrote in message
news:E2208714-9525-4379-9DAC-0BFCB236921A@.microsoft.com...
> CAN SOMEONE PLS HELP ME!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!|||can you give a specific example?
"SQL noob" wrote:

> first thing is how to search the keywords from the tables
> Second thing after u search the result ,how to link the result to a number
> related to the result?
>|||SQL noob
I'm about your request. Can you give an example? What are you
trying to achive?
http://vyaskn.tripod.com/search_all..._all_tables.htm
"SQL noob" <SQLnoob@.discussions.microsoft.com> wrote in message
news:E90610EC-47CC-416D-B4B1-11C18B47E621@.microsoft.com...
> first thing is how to search the keywords from the tables
> Second thing after u search the result ,how to link the result to a number
> related to the result?
>|||something like that?
SELECT Omim_No
FROM av
WHERE Description LIKE '%LIVER%'
ORDER BY Omim_No ASC
SELECT Omim_No
FROM cs
WHERE CS_Description LIKE '%LIVER%'
OR CS_DATA LIKE '%LIVER%'
ORDER BY Omim_No ASC
SELECT Omim_No
FROM ti
WHERE Omim_Titles LIKE '%LIVER%'
ORDER BY Omim_No ASC
SELECT Omim_No
FROM ti_alt_title
WHERE Omim_Alt_Titles LIKE '%LIVER%'
ORDER BY Omim_No ASC
SELECT Omim_No
FROM tx
WHERE Omim_Text LIKE '%LIVER%'
SELECT subsnp_id,pop_id,allele_id
FROM AlleleFreqBySsPop
WHERE 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..|||oh... come on.. pls help mi......|||Hi
Hmm, I posted the answer and it does not show up
I'd create a temporary table and using your queries with UNION ALL insert
the data into the table. Now that I inserted the data i'd JOIN this table
with your original one ON #Temp.Omim_No=Orig.Omim_No
"SQL noob" <SQLnoob@.discussions.microsoft.com> wrote in message
news:093C517E-2C62-4570-A7DF-BE5495EA7655@.microsoft.com...
> oh... come on.. pls help mi......