i got a question of how to use a result you achieve from a query in table
form and use the result to find other stuff form the other tables
for example
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%'
Instead of seraching for the word liver in the last table i would like to
search from the result i gotten from the first five table is that possible?Store the results from the first few queries in a temporary table. A slight
modification would be needed:
create table #<temp table name>
(
Omim_No <datatype>
,TextValue ntext --?
)
insert #<temp table name>
(
Omim_No
,TextValue
)
SELECT Omim_No as Omim_No
,Description as TextValue
FROM av
WHERE Description LIKE '%LIVER%'
union all
SELECT Omim_No
,CS_Description
FROM cs
WHERE CS_Description LIKE '%LIVER%'
OR CS_DATA LIKE '%LIVER%'
union all
SELECT Omim_No
,Omim_Titles
FROM ti
WHERE Omim_Titles LIKE '%LIVER%'
union all
SELECT Omim_No
,Omim_Alt_Titles
FROM ti_alt_title
WHERE Omim_Alt_Titles LIKE '%LIVER%'
union all
SELECT Omim_No
,Omim_Text
FROM tx
WHERE Omim_Text LIKE '%LIVER%'
Also consider using full-text search, it will certainly perform batter that
the LIKE operator.
ML
http://milambda.blogspot.com/|||i have a data base to search from i search the data column omim no and i
have to link to the other table in th esame database through the omim no i
gotten through some of the other tables.
"ML" wrote:
> Store the results from the first few queries in a temporary table. A sligh
t
> modification would be needed:
> create table #<temp table name>
> (
> Omim_No <datatype>
> ,TextValue ntext --?
> )
> insert #<temp table name>
> (
> Omim_No
> ,TextValue
> )
> SELECT Omim_No as Omim_No
> ,Description as TextValue
> FROM av
> WHERE Description LIKE '%LIVER%'
> union all
> SELECT Omim_No
> ,CS_Description
> FROM cs
> WHERE CS_Description LIKE '%LIVER%'
> OR CS_DATA LIKE '%LIVER%'
> union all
> SELECT Omim_No
> ,Omim_Titles
> FROM ti
> WHERE Omim_Titles LIKE '%LIVER%'
> union all
> SELECT Omim_No
> ,Omim_Alt_Titles
> FROM ti_alt_title
> WHERE Omim_Alt_Titles LIKE '%LIVER%'
> union all
> SELECT Omim_No
> ,Omim_Text
> FROM tx
> WHERE Omim_Text LIKE '%LIVER%'
>
> Also consider using full-text search, it will certainly perform batter tha
t
> the LIKE operator.
> ML
> --
> http://milambda.blogspot.com/|||The temporary table in my previous post stores the results of your queries
and can be joined on the Omim_No column to any other table where this column
is used.
What is the problem?
ML
http://milambda.blogspot.com/
Showing posts with label achieve. Show all posts
Showing posts with label achieve. Show all posts
Monday, March 19, 2012
Wednesday, March 7, 2012
Need your Help
Hi all,
I am using VB6, PostgreSQL 8.1 & Crystal Report 8.0. Now i am able to achieve the connection between a Crystal Report and postgresql database thru ODBC DSN which is hard coded in that crystal report @. design time. Is it possible to establish connection between postgresql and crystal report on run time thru VB6 code. I tried to use CR.Connect property but in vain since it is giving error as "Error detected by Database DLL"Make sure CR is installed properly
See if you find answer here
http://support.businessobjects.com/
I am using VB6, PostgreSQL 8.1 & Crystal Report 8.0. Now i am able to achieve the connection between a Crystal Report and postgresql database thru ODBC DSN which is hard coded in that crystal report @. design time. Is it possible to establish connection between postgresql and crystal report on run time thru VB6 code. I tried to use CR.Connect property but in vain since it is giving error as "Error detected by Database DLL"Make sure CR is installed properly
See if you find answer here
http://support.businessobjects.com/
Need your advice on SQL2000 and WINS
Hi all,
We have windows 2003 active directory. With SQL server,should we
configure the WIN server to achieve performance on the TCP/IP of
adaper settings? What about NetBIOS settings? Should we check the
default or enable Netbios over TCP/IP?
Thank you.Hi John
You should not need a wins server resolution should be through the DNS. For
security only use the protocols that are needed.
John
"John" wrote:
> Hi all,
> We have windows 2003 active directory. With SQL server,should we
> configure the WIN server to achieve performance on the TCP/IP of
> adaper settings? What about NetBIOS settings? Should we check the
> default or enable Netbios over TCP/IP?
> Thank you.
We have windows 2003 active directory. With SQL server,should we
configure the WIN server to achieve performance on the TCP/IP of
adaper settings? What about NetBIOS settings? Should we check the
default or enable Netbios over TCP/IP?
Thank you.Hi John
You should not need a wins server resolution should be through the DNS. For
security only use the protocols that are needed.
John
"John" wrote:
> Hi all,
> We have windows 2003 active directory. With SQL server,should we
> configure the WIN server to achieve performance on the TCP/IP of
> adaper settings? What about NetBIOS settings? Should we check the
> default or enable Netbios over TCP/IP?
> Thank you.
Subscribe to:
Posts (Atom)