none
SQL stored procedure for Merge update records RRS feed

  • Question

  • Hi All,

    I am working on one application, in which i want to read unique records from SQL database and send it to other application. 

    i have unique field name as 

    PolicyNumber, 
    WorkItemTypeId,
    OriginatingTransactionId,
    Descriptor,
    IncomingDate

    there are few records in database for which data will be same e.g :

    

    Now i want to read each record and send only unique records to other application.

    in this cause we will read record from database and will see PolicyNumber, WorkIteamTypeId,  OriginatingTransactionId and IncomingDate for for row number 1, 2 and 3 is common only Descriptor column is different in this cause i want to merge all the Descriptor in single record and will send that merged record (single record with data from row 1,2 and 3 )  and fourth row to other application once send this to required application we have one field called flag we will set it as D in same storeprocedure ?

    how to do this in storeprocedure in SQL ?


    Thanks and Regards, Nitin.

    Thursday, January 9, 2020 10:56 AM

All replies

  • Hi All,

    I am working on one application, in which i want to read unique records from SQL database and send it to other application. 

    i have unique field name as 

    PolicyNumber, 
    WorkItemTypeId,
    OriginatingTransactionId,
    Descriptor,
    IncomingDate

    there are few records in database for which data will be same e.g :

    

    Now i want to read each record and send only unique records to other application.

    in this cause we will read record from database and will see PolicyNumber, WorkIteamTypeId,  OriginatingTransactionId and IncomingDate for for row number 1, 2 and 3 is common only Descriptor column is different in this cause i want to merge all the Descriptor in single record and will send that merged record (single record with data from row 1,2 and 3 )  and fourth row to other application once send this to required application we have one field called flag we will set it as D in same storeprocedure ?

    how to do this in storeprocedure in SQL ?


    Thanks and Regards, Nitin.

    • Merged by Olaf HelperMVP Thursday, January 9, 2020 11:11 AM Same question from same OP
    Thursday, January 9, 2020 11:01 AM