Forum Replies Created

Viewing 15 posts - 17,656 through 17,670 (of 18,923 total)

  • RE: Date Difference

    Nice one Frank... it's nice to see you back here. Where have you been?

  • RE: Resultset way too large

    I'll remember to check for that someday... good thing you're there .

  • RE: Profiler duration question

    Or there's always the trick of dividing by a decimal :

    Select 2 / 1000 as [int], 2 / 1000.0 as [decimal]

    int ...

  • RE: Resultset way too large

    Not really a strange way.. but I would suggest you try to write a stored proc to resolve this search problem Read this for more details : Dynamic...

  • RE: Resultset way too large

    HTH.

  • RE: Help grouping data using a time stamp.

    Here's where the 24 thing comes in handy :

    DATEADD(hh, DATEDIFF(hh, 0, TIME_STAMP), 0) % 24

  • RE: Resultset way too large

    BTW my name is Remi, ten centuries is because I posted 1000+ message. Just like you'll be flagged as a newbie untill you post your 10th message.

  • RE: Build a leaderboard

    Well this is really something that should be done on the client side of the app... but if you insist on doing this on the server :

    Select C1.Name, (Select...

  • RE: SELF JOIN

    Select Y1.Org_Name, Y2.Org_Name from dbo.YourTable Y1 inner join dbo.YourTable Y2 on Y1.Region_Key = Y2.Org_Key

  • RE: Resultset way too large

    I understand that, but the fact is that the query is still wrong. You can use select into in combinaison with the inner join.

    Also if this is something that will...

  • RE: Build a leaderboard

    can you post the table definition along with some sample data?

  • RE: select query

    Declare @StartDate as datetime

    set @StartDate = DATEADD(M, DATEDIFF(M, 0, getdate()), 0)

    select * from dbo.transmast where trans_date between @StartDate and GetDate()

  • RE: SELF JOIN

    You'd need a self join in this situation but wouldn't it be better to have the region in a separate lookup table? Would be uch simpler to access the...

  • RE: Resultset way too large

    It's the same as doing a cross join (

    SELECT DEkeyValue AS JobNumber, DEentryTypeID, DEenteredDate AS PayDay

    FROM Diaryentry cross join workrequest

    WHERE WRenteredDate BETWEEN '2005-04-03 00:00:00' AND '2005-05-20 00:00:00'

    AND DEentryTYPEID='ENRPAY'

    )

    You'll need to...

  • RE: Date Difference

    It's not quite true... you can get only 1 value at the time, but you can use datediff to get the hours and then recall it to get the minutes......

Viewing 15 posts - 17,656 through 17,670 (of 18,923 total)