Icon View Thread

The following is the text of the current message along with any replies.
Messages 11 to 13 of 13 total
Thread An update question
Sat, Nov 7 2009 11:42 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Francisco,

<< UPDATE EMPRESA_99.CLIENTES
SET NOMBRE = SELECT NOMBRE FROM EMPRESA_01.CLIENTES WHERE CODIGO
=EMPRESA_01.CLIENTES.CODIGO >>

The EMPRESA_01.CLIENTES.CODIGO column reference is the problem.  You only
need to use table correlation names for column references (2-part
table.column reference).  You need to use this instead:

UPDATE EMPRESA_99.CLIENTES CLIENTES_99
SET NOMBRE = SELECT NOMBRE FROM EMPRESA_01.CLIENTES CLIENTES_01WHERE CODIGO
=CLIENTES_99.CODIGO

BTW, you'll notice that I also changed the column reference on the CLIENTES
table in the EMPRESA_01 database to a reference on the CLIENTES table in the
EMPRESA_99 database.  I think that is what you want to do - update the
NOMBRE column in the CLIENTES table in the EMPRESA_99 database based upon
the matching CODIGO row in CLIENTES table in the EMPRESA_01 database.

--
Tim Young
Elevate Software
www.elevatesoft.com

Sun, Nov 8 2009 4:37 AMPermanent Link

Francisco Fernandez
Tim.

Ok,  it works.

Thank you Tim
Thank you Roy
Sun, Nov 8 2009 5:45 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Tim

>The EMPRESA_01.CLIENTES.CODIGO column reference is the problem. You only
>need to use table correlation names for column references (2-part
>table.column reference). You need to use this instead:

DAMMIT I KEEP forgetting that - I'm glad I'm not the only one its biting Smiley

Roy Lambert
« Previous PagePage 2 of 2
Jump to Page:  1 2
Image