Results 1 to 1 of 1

Thread: Open Query

  1. #1
    Join Date
    Sep 2002
    Posts
    218

    Open Query

    l've created a SQl dts package and embedded the code in the attached file. l'm inserting into a stage table. l would like to add a few more things in my logic but its just not working..Please assist.

    Addition 1: Where DDT316 > today's date
    l can do it outside open query but it runs long

    Addition 2 :- Calculate age in the select based on field

    Datediff(yy,('19' + Substring(a.CleanSAID,1,6)),Getdate())
    l want it inside open qry


    Addition 3 : l'm doing an update outside open qry to close the open periods..l also want to do it within open qry.

    UPDATE tbStageLeadsMaster
    SET Clp316 = 'C'
    WHERE DDT316 < dbo.fn_formatDate(Getdate(),'yyyymmdd')
    AND Clp316 NOT IN ('R','S','C')


    l have 5million rows to process .. Please advice
    Attached Files Attached Files

Posting Permissions

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