Search Postgresql Archives

Making a query from 2 tables at same time

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi everybody

 I'm doing a two table query as follow

mhc2db=> select t1.sp, t1.pos,t2.p1, t2.p4, t2.p6, t2.p7, t2.p9  from local as t1, precalc as t2 where t1.ce='ACIAD' and t2.idr(p1, p4, p6, p7, p9, 'HLA-DRB5*0101')>2;

and i get the following error

ERROR:  schema "t2" does not exist

but  those tables exists!! and are as follow!!

mhc2db=> \d precalc  (t2)

     Table "public.precalc"
 Column |     Type     |                      Modifiers
--------+--------------+------------------------------------------------------
 id     | integer      | not null default nextval('precalc_id_seq'::regclass)
 p1     | character(1) |
 p4     | character(1) |
 p6     | character(1) |
 p7     | character(1) |
 p9     | character(1) |
Indexes:
    "h2iab" btree (idr(p1, p4, p6, p7, p9, 'H-2*IAb'::character varying))
    "h2iad" btree (idr(p1, p4, p6, p7, p9, 'H-2*IAd'::character varying))
    "h2iak" btree (idr(p1, p4, p6, p7, p9, 'H-2*IAk'::character varying))
    "h2ied" btree (idr(p1, p4, p6, p7, p9, 'H-2*IEd'::character varying))
    "hladqa10501" btree (idr(p1, p4, p6, p7, p9, 'HLA-DQA1*0501'::character varying))
    "hladr" btree (idr(p1, p4, p6, p7, p9, 'HLA-DR'::character varying))
    "hladr1" btree (idr(p1, p4, p6, p7, p9, 'HLA-DR1'::character varying))
    "hladr13" btree (idr(p1, p4, p6, p7, p9, 'HLA-DR13'::character varying))
    "hladr3" btree (idr(p1, p4, p6, p7, p9, 'HLA-DR3'::character varying))
    "hladr4" btree (idr(p1, p4, p6, p7, p9, 'HLA-DR4'::character varying))
    "hladr7" btree (idr(p1, p4, p6, p7, p9, 'HLA-DR7'::character varying))
    "hladrb10101" btree (idr(p1, p4, p6, p7, p9, 'HLA-DRB1*0101'::character varying))
    "hladrb10102" btree (idr(p1, p4, p6, p7, p9, 'HLA-DRB1*0102'::character varying))
    "hladrb10301" btree (idr(p1, p4, p6, p7, p9, 'HLA-DRB1*0301'::character varying))
    "hladrb10401" btree (idr(p1, p4, p6, p7, p9, 'HLA-DRB1*0401'::character varying))
    "hladrb10402" btree (idr(p1, p4, p6, p7, p9, 'HLA-DRB1*0402'::character varying))
    "hladrb10404" btree (idr(p1, p4, p6, p7, p9, 'HLA-DRB1*0404'::character varying))
    "hladrb10701" btree (idr(p1, p4, p6, p7, p9, 'HLA-DRB1*0701'::character varying))
    "hladrb10802" btree (idr(p1, p4, p6, p7, p9, 'HLA-DRB1*0802'::character varying))
    "hladrb10901" btree (idr(p1, p4, p6, p7, p9, 'HLA-DRB1*0901'::character varying))
    "hladrb11101" btree (idr(p1, p4, p6, p7, p9, 'HLA-DRB1*1101'::character varying))
    "hladrb11102" btree (idr(p1, p4, p6, p7, p9, 'HLA-DRB1*1102'::character varying))
    "hladrb11104" btree (idr(p1, p4, p6, p7, p9, 'HLA-DRB1*1104'::character varying))
    "hladrb11301" btree (idr(p1, p4, p6, p7, p9, 'HLA-DRB1*1301'::character varying))
    "hladrb11302" btree (idr(p1, p4, p6, p7, p9, 'HLA-DRB1*1302'::character varying))
    "hladrb11501" btree (idr(p1, p4, p6, p7, p9, 'HLA-DRB1*1501'::character varying))
    "hladrb40101" btree (idr(p1, p4, p6, p7, p9, 'HLA-DRB4*0101'::character varying))
    "hladrb50101" btree (idr(p1, p4, p6, p7, p9, 'HLA-DRB5*0101'::character varying))
    "iid" btree (id)

mhc2db=> \d local (t1)
           Table "public.local"
 Column |         Type         | Modifiers
--------+----------------------+-----------
 ce     | character varying(6) |
 sp     | character varying(6) |
 pos    | integer              |
 id     | integer              |



Someone knows what is the problem?

Thanks

Pau
--
Pau Marc Muñoz Torres

Laboratori de Biologia Computacional 
Institut de  Biotecnologia   i Biomedicina Vicent Villar                                    
Universitat Autonoma de Barcelona
E-08193 Bellaterra (Barcelona)
              
telèfon: 93 5812807
Email : paumarc.munoz@xxxxxxxxxxxxxx

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux