Complicated problem

Results 1 to 2 of 2

Thread: Complicated problem

  1. #1
    Join Date
    Dec 1969

    Default Complicated problem

    I have one table with columns<BR>A B C D E<BR>001 abab abab cada New<BR>002 bbbbb cccc ddd New<BR>003 cccc dddd eeee New<BR><BR>One of my third party Customer will upload one document or excel file<BR>which records may be or may not be same with the database column<BR>For example: the format and the column can be define according to database<BR>A E<BR>001 New<BR>003 New<BR>004 New<BR><BR>I have to compare this Word/excel documents records against database records<BR>and if records match need to update the database table column E the value<BR>New to Approved and whatever the records from document which doesn&#039;t match need to<BR>update dummy table for reference.<BR><BR>My Question is How it can be possible do to in APS/SQL Server?<BR>Please can someone help me to find some solution?<BR><BR><BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Complicated problem

    so what you&#039;re saying is, if the record exists, you want to update it, if it doesn&#039;t you want to insert it, right?<BR><BR>IF EXISTS(SELECT documentID FROM tblDocuments WHERE documentID = 2)<BR>BEGIN<BR>UPDATE tblDocuments ....<BR>END<BR>ELSE<BR>BEGIN<BR>INSERT tblDocuments....<BR>END<BR><BR>GO<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts