Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Oracle Server > Re: Updating Or...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 7 Topic 16548 of 17418
Post > Topic >>

Re: Updating Oracle database from SQL Server as linked table

by Garrett Fitzgerald <SarekOfVulcan@[EMAIL PROTECTED] > May 12, 2008 at 06:46 PM

On May 12, 5:50=A0pm, "Terry Dykstra" <tddyks...@[EMAIL PROTECTED]
> wrote:
> "Garrett Fitzgerald" <SarekOfVul...@[EMAIL PROTECTED]
> wrote in message
> >I have a medical records system where parts live in Oracle and parts
> > live in SQL Server. I'm trying to inactivate a lot of patients who
> > haven't been seen since the conversion by updating them on the SQL
> > Server side and then updating the Oracle side to match. I'd like to be
> > able to use the following query:
>
> > UPDATE server..user.table
> > =A0 =A0SET OraField1 =3D 'I'
> > =A0 =A0WHERE OraField1 =3D 'A'
> > =A0 =A0 =A0 =A0 AND OraField2 IN (
> > =A0 =A0 =A0 =A0 =A0 =A0SELECT SQLfield2
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0FROM SQLTable
> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0WHERE SQLField1 =3D 1
> > =A0 =A0 =A0 =A0 =A0 =A0)
>
> > However, when I do this, I get an error saying that the field "was
> > re****ted to have a DBTYPE of 130 at compile time and 5 at run time".
> > ... OpenQuery doesn't seem like it will do
> > what I want, and I don't want to accidentally inactivate everyone in
> > the database...
>
> OpenQuery is the only way you'll get around that dbtype error. =A0I've
fou=
nd
> OpenQuery to work very well.

Ok, how do I do that? Would this be the correct syntax?

UPDATE OpenQuery(Server, 'select pid, orafield1, orafield2 from
oratable')
   SET OraField1 =3D 'I'
   WHERE OraField1 =3D 'A'
        AND OraField2 IN (
           SELECT SQLfield2
               FROM SQLTable
               WHERE SQLField1 =3D 1
           )
 




 7 Posts in Topic:
Updating Oracle database from SQL Server as linked table
Garrett Fitzgerald <S  2008-05-12 13:42:07 
Re: Updating Oracle database from SQL Server as linked table
"Terry Dykstra"  2008-05-12 21:50:04 
Re: Updating Oracle database from SQL Server as linked table
Garrett Fitzgerald <S  2008-05-12 18:46:31 
Re: Updating Oracle database from SQL Server as linked table
Mladen Gogala <mgogala  2008-05-13 07:07:34 
Re: Updating Oracle database from SQL Server as linked table
Mark D Powell <Mark.Po  2008-05-13 06:49:12 
Re: Updating Oracle database from SQL Server as linked table
Mladen Gogala <mgogala  2008-05-13 22:27:32 
Re: Updating Oracle database from SQL Server as linked table
Garrett Fitzgerald <S  2008-05-14 09:15:45 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Nov 22 15:38:48 CST 2008.