Forum Replies Created

Viewing 15 posts - 1,111 through 1,125 (of 2,452 total)

  • RE: Change to user input prompt?

    This code will be used in Excel. Using the External source link.

    maybe best if you explain how you are expecting Excel and SQL to interact first....then we can move on

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

  • RE: OUTER JOIN Not Producing Non Existent Record with IS NULL

    Steve's seems to be working, in my test db environment. But due to the EndYear not being a field and I can't figure out how to edit it as posted,...

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

  • RE: OUTER JOIN Not Producing Non Existent Record with IS NULL

    serviceaellis (8/21/2015)


    J Livingston SQL,

    Thank you for the link on Using SP!

    This is also to sgmunson,

    On the question of Crystal, again I thought I answered it.

    The end-user enters the year they...

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

  • RE: Grouping islands of data

    jessica.green2312 (8/21/2015)


    Yes, we only ever have Ds and Fs. This is perfect - thank you so much!!!

    you are welcome....how long did it take to run?

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

  • RE: Pivots date ranges with union data

    Hi ...welcome to SSC

    as a start, I would suggest reading this article below in how to provide us with an easy way to see what you are doing and this...

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

  • RE: Grouping islands of data

    jessica.green2312 (8/21/2015)


    Apologies! No, that's an oversight on my part. Here is the corrected sample data and attached example result set:

    SELECT 140675885,072915107,1580,'D' UNION ALL

    SELECT 140675886,072915107,11,'D' UNION ALL

    SELECT 140675887,072915107,1580,'D' UNION ALL

    SELECT 140675888,072915107,109,'D'...

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

  • RE: handling odd date format

    guessing.....

    declare @d as datetime = '1900-01-01'

    select dateadd (dd,41981,@d) as calcdate

    calcdate

    2014-12-10 00:00:00.000

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

  • RE: OUTER JOIN Not Producing Non Existent Record with IS NULL

    Which states that the View, which is the only way Crystal could link to that I know of, so again I do not know why solutions were not provided so...

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

  • RE: Remove duplicate row

    pwalter83 (8/21/2015)


    Hi,

    I have an issue where I need to remove a duplicate row based on a value. For e.g. if there are 2 values - 1234567 and 1234567A, then the...

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

  • RE: OUTER JOIN Not Producing Non Existent Record with IS NULL

    serviceaellis (8/20/2015)


    J Livingston SQL (8/20/2015)


    can you please post image of final Crystal report.....thanks

    Unable to at the moment ....

    no problem ...i will wait until you can.

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

  • RE: OUTER JOIN Not Producing Non Existent Record with IS NULL

    serviceaellis (8/20/2015)


    J Livingston SQL (8/20/2015)


    did you try my code?

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

    did it give you a summary as you expect?

    Hi J Livingston SQL,

    I thought I replied to that formula.

    Though it looks to display...

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

  • RE: OUTER JOIN Not Producing Non Existent Record with IS NULL

    serviceaellis (8/20/2015)


    To summarize issue,

    when the formula is changed to handle >=EndYear it does not produce the correct information for ClubNo 5305.

    the correct information is only produced when doing an =EndYear.

    The...

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

  • RE: Multiple records on one row..

    Hi BO

    just wondering and perhaps you can explain the rationale behind your request please?

    here is some test data to use and using ChrisM's code

    SELECT TOP 1000000

    CustomerID =...

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

  • RE: OUTER JOIN Not Producing Non Existent Record with IS NULL

    maybe an idea for you try out.....

    DECLARE @yr INT

    SET @yr = YEAR(GETDATE())

    --SET @yr = 2016

    ;

    WITH cteclub AS (

    SELECT DISTINCT

    ClubID

    , ClubNo

    , ClubName

    , President

    --...

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

  • RE: Can't use >= with setInt

    ChrisM@Work (8/20/2015)


    serviceaellis (8/19/2015)


    Currently working with

    DECLARE @yr AS int;

    SET @yr = 2015;

    which is used in

    WHERE (YEAR(EndDate) = @yr)

    ...

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

Viewing 15 posts - 1,111 through 1,125 (of 2,452 total)