Viewing 15 posts - 76 through 90 (of 210 total)
Roland C (7/24/2014)
In queries that include a correlated subquery (also known as a repeating subquery), the subquery depends on the outer...
July 25, 2014 at 1:04 am
Livingston, I took the logic What you have mentioned, I took the count of those days which are matching in both assgn_dtm and complet_dtm and then deducting those from sum...
July 21, 2014 at 2:34 am
I am sorry, Chris for not mentioning your name. Thanks for your support
July 18, 2014 at 9:06 am
Thank you J Livingston and David Burrows.
I appreciate your help and time
July 18, 2014 at 8:20 am
twin.devil (7/18/2014)
select [cs_id],userid, SUM(DATEDIFF(dd,[assgn_dtm],[complet_dtm])) - count(*)
from (
select distinct [cs_id],userid,cast([assgn_dtm] as date) as [assgn_dtm], cast([complet_dtm] as date) as [complet_dtm]
from temp_tbl
) Z
group by [cs_id],userid
does it make any sense ?
twin,
for count(*) --...
July 18, 2014 at 6:23 am
For that only I need logic to get the required output, but i am truly stuck what to provide now
select cs_id,USERID, SUM(datediff(dd, assign_dtm, complet_dtm))-(COUNT(repetitive_dates))
from temp_tbl
--if the same date...
July 18, 2014 at 4:57 am
twin,
we have two date columns like assgn_dtm and complet_dtm.
Need to calculate the difference of these two dates
for a given cs_id and userid
cs_id and userid can have multiple rows for...
July 18, 2014 at 4:03 am
select cs_id,USERID, SUM(days_of_diff)-(COUNT(dates) --if the same date is appearing both in assgn_dtm and complet_dtm)
from temp_tbl
like
select 1000090 'cs_id',1000031 'USERID', 22-11 total_pending_days
July 18, 2014 at 3:32 am
Though, the answer is NO , still wanted to make sure that there no catch or new enhancement in sql server 2014 🙂
July 17, 2014 at 3:31 am
This is my understanding. primary key is a constraint not an index, but it creates an index automatically by default, but primary key is called a constraint not an index...
July 15, 2014 at 11:11 pm
I also have no knowledge about powershell script. I have saved the script as.ps1 and executed it in command prompt like mentioned below.
powershell -ExecutionPolicy ByPass -File c:\Document1.ps1
(I could...
July 14, 2014 at 3:33 am
I have actually thought of this question yesterday :-), I am surprised to see it today.
(of course, I don't have plans to submit as QOTD)
July 10, 2014 at 11:41 pm
I have searched all the deprecated / discontinued features in 2012 but could not find "compute", and got it wrong 🙁 :crying:
( I had to run the code in 2008...
July 8, 2014 at 9:18 am
Viewing 15 posts - 76 through 90 (of 210 total)