Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
kond.mohan
Posting Yak Master
213 Posts |
Posted - 2012-04-11 : 07:54:04
|
i have used 1 tablehere i want find the count of days based on days split into 3 columnscount(datediff(dd,max(fbh.due_Date,fbh.vfd_bod_date))i need to find the days calculation need to use max(fbh.vfd_bod_date) ,fbh.due_Date columnlikedatediff(dd,max(fbh.due_Date,fbh.vfd_bod_date)here in my sub query i have used having conditionhaving max(fbh.vfd_bod_date)>fbh.due_datei want find the datediff between 2 days one column is direct datesecond column is max(fbh.date) column need to fetchcan any body help me on this issue |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-04-12 : 00:53:28
|
you need to apply group by to get max(date)thats only suggestion one can give based on information providedplease post some sample data and explain what you want if you need more help------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|