SQL Query

Author Message
tbraga

  • Total Posts : 43
  • Scores: 0
  • Reward points : 0
  • Joined: 2/1/2006
  • Status: offline
SQL Query Friday, November 24, 2006 2:38 AM (permalink)
0
Hi All,
 
I seem to be getting confused on this statement.  We recently installed integrator software to synchronize a few of our databases, I configured the application, setup all the DSN's, and the mapping.  Currently the job runs without errors but when I run it twice it places duplicates into the target table, obviously because there is not a where clause.  I was thinking of a couple of things but was not sure how to go about it, syntax, code structure ect...
 
I was thinking of using something like this to verify in the target table if the record already exists, but then again about not sure where to put this or which variables I need to declare:
       where not in (Select [Last Name], [StartDate]  from [_Customer_])    
 
Here is the mapping code from the Integrator Software:
 
Sub mapData()
                
     'targetRow("TargetColumn") = sourceRow("SourceColumn")
     targetRow("First Name") = sourceRow("FirstName")
     targetRow("Last Name") = sourceRow("LastName") 
     targetRow("EMail Address") = sourceRow("EMAIL")
     targetRow("Title") = sourceRow("JbcLongDesc")
     targetRow("StartDate") = sourceRow("EecDateOfLastHire")
     targetRow("TermDate") = sourceRow("EecDateOfTermination")
     targetRow("ClientText01") = sourceRow("MgrName")

End Sub
 
#1

    Online Bookmarks Sharing: Share/Bookmark

    Jump to:

    Current active users

    There are 0 members and 1 guests.

    Icon Legend and Permission

    • New Messages
    • No New Messages
    • Hot Topic w/ New Messages
    • Hot Topic w/o New Messages
    • Locked w/ New Messages
    • Locked w/o New Messages
    • Read Message
    • Post New Thread
    • Reply to message
    • Post New Poll
    • Submit Vote
    • Post reward post
    • Delete my own posts
    • Delete my own threads
    • Rate post

    2000-2012 ASPPlayground.NET Forum Version 3.9