Forum Replies Created

Viewing 15 posts - 841 through 855 (of 2,452 total)

  • RE: Are the posted questions getting worse?

    Sean Lange (3/29/2016)


    SQLRNNR (3/29/2016)


    Sean Lange (3/29/2016)


    Finally!!! Somebody who claims experience with sql server that knows getdate(). The response was much as I would expect. An immediate answer that sounded timid...

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

  • RE: Nested Joins - Having syntax and bounding issues

    suggest you read this article on how to post.......makes it so much easier for all involved in helping you

    http://spaghettidba.com/2015/04/24/how-to-post-a-t-sql-question-on-a-public-forum/

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

  • RE: Querying multiple databases

    <<deleted>> OP answered whilst posting

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

  • RE: Querying multiple databases

    kaplan71 (3/25/2016)


    Hello --

    Thank-you for your posting, I ran the script you posted, substituting the actual patient ID in the appropriate slot. However, the query produced the following error for

    each of...

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

  • RE: pICKING EARLIEST DATE

    ssisguy (3/24/2016)


    I need to pick earliest Security Date for each Security Id ..see attached sample text..

    for security id 10000 securutiy desc cahnged from abc to xyz and it should...

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

  • RE: Finding retention of a person

    oop error in previous code

    try this

    USE tempdb

    GO

    -- create a temp table that unpivots the data you previously provided as "mytable"

    -- only create records where there was actual attendance ...

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

  • RE: Finding retention of a person

    heres a few thoughts

    hopefully code comments explain

    EDIT -- error in code posted...please new post below

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

  • RE: Finding retention of a person

    maybe easier if we worked on the recordsource rather than the pivot me thinks.

    can you supply sample data for the base recordset?

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

  • RE: Finding retention of a person

    Stephen crocker (3/21/2016)


    OOps try this one as the data source. Sorry I was messing with the query earlier.

    ok...will take a look later

    can I repeat my earlier question please

    is this...

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

  • RE: Finding retention of a person

    having now looked at your sample data, I am none the wiser.

    you have 39 rows...all of whom it "appears" attended in year 2013 (assume that "1" = attendance).....but none...

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

  • RE: Finding retention of a person

    Stephen crocker (3/21/2016)


    I have included the file now.

    pk...based on your data that you have now supplied....what are your expected results, based on this data?

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

  • RE: Finding retention of a person

    suggest you read this link and post back with suggested details

    http://spaghettidba.com/2015/04/24/how-to-post-a-t-sql-question-on-a-public-forum/

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

  • RE: indexes-non clustered

    mithleshdb8 (3/20/2016)


    hi all

    how to sort non clustered indexes ? any suggestion on this

    your question appears a bit sparse in detail...can you explain , maybe with examples, of what your...

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

  • RE: TSQL Dynamic columns and SUM at the end

    does this help ?

    Count(*) over(partition by av.CreatedBy,av.EventTypeID) Total

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

  • RE: TSQL Dynamic columns and SUM at the end

    hexdecimal1989 (3/20/2016)


    Thanks J Livingston!

    I think that Employee table is not necessary but here it is preety much a whole db 🙂

    Thanks!

    well you use it in your dynamic code

    SET @query =...

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

Viewing 15 posts - 841 through 855 (of 2,452 total)