Entrez query syntax
Nicknames based on the Entrez wrapper generally require the use of a special function. The Entrez wrapper must translate the SQL query into a query that the Entrez API will understand and not all elements of a standard SQL where clause can be so translated.The schema description tables for datasets that make use of the Entrez wrapper include two extra columns:
- The 'Q' column designates that a given field can be used when searching an Entrez table. One queries such a column using a request containing a clause or clauses containing the 'CONTAINS' function, as in:
SELECT * FROM NCBI.PMARTICLES WHERE ( ENTREZ.CONTAINS( ARTICLETITLE, 'drosophila') = 1 )or
SELECT AUTHORLIST, ARTICLETITLE FROM NCBI.PMARTICLES WHERE ( ENTREZ.CONTAINS( ARTICLETITLE, 'drosophila') = 1 ) AND ( ENTREZ.CONTAINS( AUTHORLIST, 'Kaufmann OR Ito') = 1 )or
SELECT * FROM NCBI.GBSEQ WHERE ( ENTREZ.CONTAINS( ORGANISM, 'drosophila') = 1 ) AND ( ENTREZ.CONTAINS( SEQLENGTH, '25' ) = 1 )or
SELECT PRIMARYACCESSION, SEQLENGTH, DEFINITION, SEQUENCE
FROM NCBI.GBSEQ
WHERE ( ENTREZ.CONTAINS( ORGANISM, 'HUMAN') = 1 )
AND
( ENTREZ.CONTAINS( DEFINITION, 'JAK3' ) = 1 )
or
SELECT PMID, AUTHORLIST, ARTICLETITLE FROM NCBI.PMARTICLES
WHERE
( ENTREZ.CONTAINS(AUTHORLIST, 'kaufmann OR ito') = 1 )
AND
(
( ENTREZ.CONTAINS (ARTICLETITLE, 'drosophila') = 1 )
OR
( ENTREZ.CONTAINS(ABSTRACT, 'drosophila OR "fruit fly"') = 1 )
)




