Forum Replies Created

Viewing 15 posts - 631 through 645 (of 2,452 total)

  • RE: Create or update rows on the basis of time interval

    I am a little confused on your post(s)...but that maybe a language issue.

    you speak about a "resultant" table...can you clarify is this the actual db table you require to be...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Accept Failure

    Wayne West (6/3/2016)


    Among many places, you can find it here.

    many thanks

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Accept Failure

    Ed Klein-385786 (6/3/2016)


    This is an example of why every developer and especially every project manager should be required to read "The Mythical Man-Month" by Fred Brooks, subtitled Essays On Software...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Replace Value

    have you considered using "CASE WHEN...THEN...ELSE...END"

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: SELECT from Many-to-Many Columns Unique Values from Column 1 and Non-duplicate from Column2

    yb751 (6/1/2016)


    Ok so after a few voodoo spells and a couple chickens later I came up with this. If it looks weird, that's because it is. I'm pretty...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: T-SQL: Aggregate and/or conditional subquery on where clause

    desired results for you

    +-----------------------------------------------------------------------------------------------------------------------+

    ¦ DESIRED QUERY RESULTS ...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: SELECT from Many-to-Many Columns Unique Values from Column 1 and Non-duplicate from Column2

    yb751 (6/1/2016)


    hmmm...yeah that throws a wrench in things. I just wished we knew more.

    hehe....pity the OP didnt post an update when (s)he peeked out from behind the sofa, half...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: SELECT from Many-to-Many Columns Unique Values from Column 1 and Non-duplicate from Column2

    some more testdata to play with

    CREATE TABLE #yourtable(

    id INTEGER NOT NULL

    ,alert_code ...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: SELECT from Many-to-Many Columns Unique Values from Column 1 and Non-duplicate from Column2

    as an example of how to present some sample data see below and here https://spaghettidba.com/2015/04/24/how-to-post-a-t-sql-question-on-a-public-forum/

    CREATE TABLE #yourtable(

    id ...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Split two delimited strings in table

    mikes84 (6/1/2016)


    .....using a method that does not require a Tally table, CLR, or any functions.

    any reason why no Tally or functions?

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Inserting XML

    should the code have been

    CREATE TABLE Mytest (id XML, x XML)

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Calculate time difference based on Status field

    shagil.a.gopinath (5/31/2016)


    Hi John

    Still its not meet my requirement, i need only the total hours as result. In the below query i get the total hours but i am not able...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Calculate time difference based on condition - SQL Server

    I gave response on your other thread.....please dont double post

    http://www.sqlservercentral.com/Forums/FindPost1790784.aspx

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Calculate time difference based on Status field

    I trust you understand that DATEDIFF returns the count of the specified datepart boundaries crossed between the specified startdate and enddate.

    eg...even though the start and end times below are only...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Calculate time difference based on Status field

    Onthe assumption (dangerous I know!) that the inactive records always appear as two consecutive rows when ordered by site/datetime then the following mayhelp

    CREATE TABLE [dbo].[Temp2](

    [SiteCode] [int] NULL,

    [StatusTime] [datetime] NULL,

    [Status] [char](2)...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

Viewing 15 posts - 631 through 645 (of 2,452 total)