Forum Replies Created

Viewing 15 posts - 2,926 through 2,940 (of 5,103 total)

  • RE: Find Datetime Range Durations

    does the first (inner) query complete prior to running the second (outer) query when they are combined?

    When combined you may get a completly different plan!! and for sure you will...

  • RE: Is this possible

    Well I think there is a way

    M$ uses this all the time in their replication procedures which are all over the place in the publisher,...

  • RE: Find Datetime Range Durations

    Do you have a lot of activity on the underlaying tables of dbo.tsgvw_JDEEmployeeHireRehireView ?

    if that is the case, with the first one you are performing a minimally logged table operation...

  • RE: How to handle Huge numbers greater than bigint datatype

    For some reason I beleieve that if you need an integer number greater than max bigint you  have probably bigger problems!

    why 1500 nodes need a number greater than:

    9,223,372,036,854,775,807

    I...

  • RE: Function is slow when ...

    |--Compute Scalar(DEFINE[Expr1002]=Convert([Expr1015]), [Expr1003]=If ([Expr1016]=0) then NULL else [Expr1017]))

           |--Stream Aggregate(DEFINE[Expr1015]=Count(*), [Expr1016]=COUNT_BIG([dbo].[fnMS_PR_GetTorchWeightForHeat]([HeatTable].[HeatNumber])), [Expr1017]=SUM([dbo].[fnMS_PR_GetTorchWeightForHeat]([HeatTable].[HeatNumber]))))

                |--Hash Match(Inner Join, HASH

  • RE: Find Datetime Range Durations

    you can perform a couple of things before I proceed:

    1.

    Can you run this:

    SELECT t1.AddressNumber , t1.HistoryDate as [DateTime] , t1.DateType as value , isnull(MIN( t2.HistoryDate ),@LimitDate) as NextDateTime

    into #T3

     FROM...

  • RE: Find Datetime Range Durations

    are you saying thatthis outer wrapper :

    SELECT  t3.Datetime AS StartTime,t3.NextDatetime AS EndTime,t3.AddressNumber,Datediff(dd,t3.Datetime,t3.NextDatetime) AS 'Dur'

    FROM (

    ) AS t3 ( AddressNumber , Datetime , value , NextDateTime )

    WHERE t3.value =...

  • RE: Question of the Day for 10 Aug 2005

    What I still don't get is how come someone submmits a question without even test it before!!

    This could have been a wounderful question...

  • RE: macro substitution in sql

    you can double the number of ' (single quotes)

    like

    exec stored_procedure 'select * from table1 where tag = ''1'''

    note that '' (two single quotes) <> " (one double quote)

    hth

     

  • RE: Find Datetime Range Durations

    -- Just small changes

    Declare @LimitDate datetime

    set @LimitDate = '20050809'

    SELECT  t3.Datetime AS StartTime,t3.NextDatetime AS EndTime,t3.AddressNumber,Datediff(dd,t3.Datetime,t3.NextDatetime) AS 'Dur'

    FROM (

     SELECT t1.AddressNumber , t1.HistoryDate , t1.DateType...

  • RE: Transaction Error

    Chris,

    Rollback does not ends the batch or workflow, it simply ... rollsback (@@Trancount =0) all previously started transactions

    I the case where the return was missing you get the error because...

  • RE: CREATE VIEW in dynamic SQL

    Erm, with all the trash talked here let me get something clear.

     I LIKE Women

    Now if you weed out the jokes you may get...

  • RE: Using Parameters with Stored Procedures

    Contrary to what you said I have worked with companies in the past that learned the HARD way that when the amount of non trivial queries or users become part...

  • RE: Tough Consolidation of Rows

    This is the cursor version that perform only one pass to the table:

     

     create table YourTable (NumSet1 int, NumSet2 int, SetVal char(1) )

     go

     

     insert into YourTable (NumSet1, NumSet2, SetVal) values ( 201645112,...

  • RE: Tough Consolidation of Rows

    Can you change them to int ?

    the fact that you have tempdb to autogrow just means that you will not run out of space but you may not want it...

Viewing 15 posts - 2,926 through 2,940 (of 5,103 total)