I have a simple logic but i am missing something in below query.For all the records with Max(column), set the flag to 1 else 0. how can i do this in Case statement?For Example,Table 1ID Date1 1/1/19002 1/1/19003 getdate()4 Getdate()Now I want to set a flag and for all the ID's with max date i.e. getdate() in this example but it could be anything, it should be 1 else 0.any thoughts would be appreciated.
↧