Quantcast
Channel: SQL Server Reporting Services, Power View forum
Viewing all articles
Browse latest Browse all 20764

correct date field to be selected?

$
0
0
You cannot vote on your own post
0

I am doing a query on finding out when a service is suspended.

I have a created date.  I have a suspended date.  So far so good.  However some servies are suspended multiple times.  Currently I just need to know the amount of days between the created date and the first suspended date.  So I thought it might be easier to create a date difference column to get over this.  However when I ran the data I got information like this.  So how can I be certain to pick up the first row only of tpk1?  Any help would be great on this. 

So I have records looking like this

tpk                     start_date                                                suspended date                                               Days_diff

1                        2013-04-16 17:09:30.680                     2013-04-17 11:21:05.420                                            1

1                        2013-04-16 17:09:30.680                     2013-04-17 17:09:30.680                                            1     

1                        2013-04-16 17:09:30.680                     2013-04-17 14:17:55.090                                            1

2                        2013-04-29 13:43:42.240                    2013-04-29 13:58:01.120                                            1

<input id="f2974d29-c88a-4f3f-b589-55d6c9590fe1_attachments" type="hidden" />
      

Viewing all articles
Browse latest Browse all 20764

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>