Hi Dan,

I think you mean Correlation-Name
Which is usually accomplished in the From statement

Example:
Update Verification.campaign
    Set vc.DBCompany=oc.DBCompany,
    vc.NeverCallFlag=oc.NeverCallFlag,
    vc.AgentID=oc.AgentID,
    vc.VerificationAgentID=oc.VerificationAgentID,
    vc.CallResultCode=oc.CallResultCode,
    vc.DateTimeofCall=oc.DateTimeofCall
        From Verification.campaign vc, Original_Outbound.campaign oc
            Where oc.PhoneNum=vc.campaign.PhoneNum 
            and oc.CallResultCode=12 
            and oc.PhoneNum Is Not Null

Sorry, can remember the sequence in SQLServer
I think it is [database-name.][user-id.]table-name
Example: Verification.dbo.campaign

Chech the SQL Docs for From Clause

Hope this helps

Ben Johansen - http://www.pcforge.com
Authorized Witango Reseller http://www.pcforge.com/WitangoGoodies.htm�
Latest downloads &�List Archives�@ http://www.witango.ws
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:owner-witango-talk@;witango.com] On Behalf Of Dan Stein
Sent: Monday, October 21, 2002 4:47 PM
To: Multiple recipients of list witango-talk
Subject: Witango-Talk: SQL DBMS Help

Would be nice to know the Alias thing but found my mistake in this one.
No column define in 1st set line. 


Have two databases.
Verification
Original_Outbound

Need to update the Campaign table in Verification with data from
Original Outbound.

Would love to use Table alias if I can because there are a boatload of
columns ( not my design just try to do the DBMS for someone else)

Here is what I have but it does not work.

I always have trouble with the syntax when using two different DBO's





Update Verification.campaign

����Set Verification.campaign=Original_Outbound.campaign.DBCompany,

����Verification.campaign.NeverCallFlag=Original_Outbound.NeverCallFlag,

����Verification.campaign.AgentID=Original_Outbound.AgentID,

����Verification.campaign.VerificationAgentID=Original_Outbound.Verifica
tionAgentID,

����Verification.campaign.CallResultCode=Original_Outbound.CallResultCod
e,

����Verification.campaign.DateTimeofCall=Original_Outbound.DateTimeofCal
l



��������From Verification.campaign, Original_Outbound.campaign

������������Where
Original_Outbound.PhoneNum=Verification.campaign.PhoneNum 

������������and Original_Outbound.CallResultCode=12 

������������and Original_Outbound.PhoneNum Is Not Null


-- 
Dan Stein
Digital Software Solutions
799 Evergreen Circle
Telford PA 18969
Land: 215-799-0192
Mobile: 610-256-2843
Fax 413-410-9682
FMP, WiTango, EDI,SQL 2000
[EMAIL PROTECTED]
www.dss-db.com

________________________________________________________________________
TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
                with unsubscribe witango-talk in the message body

Reply via email to