mercredi 5 août 2015

SQL Server IF statement?

I have two tables, with the following info:

Table1      Table2
--          --
ID#1        Item#1
ID#2        Item#1
            Item#2

If an ID# has more than one item, it compares the dates in the created_date column of Table2 and pick the Item# with the latest created_date.

Can anyone help me on this?

Aucun commentaire:

Enregistrer un commentaire