Forum Replies Created

Viewing 15 posts - 196 through 210 (of 347 total)

  • RE: T-SQL Calculation

    Desired result ..

    SELECT 'Invest' AS TYPE,'XXX' AS Unit,0 AS ForeCast,1 AS Week,9190.2 AS Trend

    UNION

    SELECT 'Invest' AS Type,'XXX' AS Unit,0 AS ForeCast,2 AS Week,18380.4 AS Trend

    UNION

    SELECT 'Invest' AS TYPE,'XXX' AS Unit,0...

  • RE: Convert Bigint time to datetime

    According to the query time returned is 1970-03-12 19:15:49.000 .

    SELECT DATEADD(hh,-5,dateadd(s, convert(bigint, 6135349140000) / 1000000, convert(datetime, '1-1-1970 00:00:00')))

    The correct time that should be returned is 2014 -03-20 03:27:00.00

  • RE: Convert Bigint time to datetime

    I have a couple of 14 digit int time in my table

    SELECT DATEADD(hh,-5,dateadd(s, convert(bigint, 61353491400000) / 1000, convert(datetime, '1-1-1970 00:00:00')))

    The above query throws an error :

    Arithmetic overflow error converting expression...

  • RE: Convert Bigint time to datetime

    SELECT DATEADD(hh,-5,dateadd(s, convert(bigint, 1397750400000) / 1000, convert(datetime, '1-1-1970 00:00:00')))

    worked for me!

  • RE: Convert Bigint time to datetime

    select DATEADD(Minute, 1397750400000, '1970-00-01')

    Getting an overflow error .

    Arithmetic overflow error converting expression to data type int.

  • RE: Convert Bigint time to datetime

    Minutes

  • RE: Eliminating duplicates while insert

    Thanks everyone.

  • RE: Eliminating duplicates while insert

    Query with alias :

    WITH cte_OrderProjectType AS

    (

    select A.Orderid, min(B.TypeID) , min(C.CTType) , MIN(D.Area)

    from tableA A inner join

    tableB B ON A.PID = B.PID left join

    tableC C ON C.TypeID = B.TypeID...

  • RE: Eliminating duplicates while insert

    There are multiple queries in the view that uses MIN and total time to execute the view is 8 minutes . 🙁

    This view is used by a stored procedure which...

  • RE: SSRS - show reports like slideshow

    Your example works perfectly .

    Thank You!

  • RE: SSRS - show reports like slideshow

    The parent report in SSRS is Dashboard1. After around 2 minutes we need to display Dashboard2 then after 2 minutes display Dashboard1 again..

    As all our reports are viewed in report...

  • RE: SSRS - show reports like slideshow

    I can not use report viewer control as I am not using a web page.

  • RE: SSRS - show reports like slideshow

    Also

    AS mentioned before, the requirement is to show reports (two reports)one after the other like a slide show as two different reports (not in the main report).

    Report A -...

  • RE: SSRS - show reports like slideshow

    Can you explain what is done with :

    = Iif((minute(Now) mod 4)<2,True,False)

    Report 2:

    = Iif((minute(Now) mod 4)>=2,True,False)

    Thanks,

    PSB

  • RE: Retrieve last 7 days date question

    Thanks!

    SELECT DISTINCT TOP 7 Convert(DateTime, DATEDIFF(DAY, 0, DateCreated)) AS DateCreated,

    datepart(dw,DateCreated) AS WeekNum from [TechnologyRepository].[helpdsk].[WorkDetails]

    WHERE DATEDIFF(DAY, Convert(DateTime, DATEDIFF(DAY, 0, DateCreated)),GETDATE()) <= 7

    Order By Convert(DateTime, DATEDIFF(DAY, 0, DateCreated)) DESC

    would also work..

Viewing 15 posts - 196 through 210 (of 347 total)