Db Link Problem

From: Labsys <labsys_at_ctcreuna.cl>
Date: 1998/10/20
Message-ID: <01bdfbd0$94aee0a0$LocalHost_at_ministro>#1/1


I have a problem with DB Link

(1) I define DB Link "link_to_7_1_4" to connect Oracle 7.1.4
(2) I define public synonym "pub_syn" for table_at_link_to_7_1_4
(3) Relevant table definition

     tab1 :
            campo4 date
            campo7 number

     pub_syn :
	campo5 date not null
	campo6 number


(4) I have this select :
select a.campo1,a.campo2,b.campo3 from tab1 a , pub_syn b where a.campo4 = b.campo5 and b.campo6 = 1 and a.campo7 = 4635 /
(4) run this select, then obtain this result :
ORA-00932 inconsistent datatypes ORA-02063 preceding str from name

 If modify this select that follow :

	select a.campo1,a.campo2,b.campo3
            from tab1 a , pub_syn b
            where a.campo4 = to_date(b.campo5)
            and    b.campo6 = 1
            and    a.campo7 = 4635
            /
 

or

	select a.campo1,a.campo2,b.campo3
            from tab1 a , pub_syn b
            where a.campo4 = b.campo5
            and    to_number(b.campo6) = 1
            and    a.campo7 = 4635
            /

or

	select a.campo1,a.campo2,b.campo3
            from tab1 a , pub_syn b
            where a.campo4 = b.campo5
            and    b.campo6 = 1
            and    to_number(a.campo7) = 4635
            /

I have not problem

thank for every help Received on Tue Oct 20 1998 - 00:00:00 CEST

Original text of this message