2

I return an open query for updating table data in oracle. Can I use condition (CARD_NUMBER=tb3.cardno) inside openquery? Below is my query:

update openquery(link,'select FORACID,CARD_TYPE,CARD_NUMBER 
                       from sibatmbank 
                       where CARD_NUMBER=tb3.cardno') set
FORACID=tb2.Predefined_AccNo,CARD_TYPE=tb3.CardType 
from EXT1 tb2,Complex1 tb3
where tb2.InstId=tb3.name 
and  
tb2.InstId in ('119')
arcain
  • 14,920
  • 6
  • 55
  • 75
venu
  • 53
  • 1
  • 1
  • 6

1 Answers1

0

No, you can't.

Instead you can change data in linked table by calling it "link..sibatmbank". Something like:

update link..sibatmbank s
set 
  s.FORACID=tb2.Predefined_AccNo, 
  s.CARD_TYPE=tb3.CardType
from 
  EXT1 tb2,
  Complex1 tb3
where 
  s.CARD_NUMBER=tb3.cardno
  and tb2.InstId=tb3.name 
  and tb2.InstId in ('119')