I have got 2 fields in my db(sql server 2008) namely updateDate[Datetime] & calldate[datetime]. The sql query I am running to get the data from th db is :
Select * from [Clients] where [Timestamp] < GetDate() ORDER BY calldate, updateDate
Now the issue is the callbackdate has default value of minimum date , so if no date is passed , it adds the minimumdate, I want to add a check on the above query so it doesnt sort the records with calldate value is set to minimum date value. For instance if the calldate is minimumdate then that record should be sorted by renewal date.Is it possible to acheive something like this.
Any suggestions or advice will be highly appreciated.
Thanks
1 Answer