Need help on queries to select, compare and insert to a new table

  • I am new in using SQL.  My problem is as follow:

    Table-A has two date columns.  They are date1 and date2. 

    Table-B has just one date column. 

    I have to take date1 from Table-A and find a equal date from Table-B. If found, Return the date from the next record (from Table-B). 

    The value returned from Table-B will then be compared with Date2 (From Table-A).  If these dates are not equal, then insert the value of Date1 and Date2 to Table-C.

    Can this be possible done with Stored Procedure?  Example please. 

    Thank you in advance.

     

     

  • This was removed by the editor as SPAM

  • hi,

    could you give what you are really trying todo/

    bassguy

  • Thank you for the response, I finally got it to work.  Thanks!

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply