Forum Replies Created

Viewing 15 posts - 466 through 480 (of 844 total)

  • RE: Convert Date to Julian Date

    This is what i have for converting to a Julian date, also included is converting a Julian date back to a regular date.

    DECLARE @input_date DATETIME;

    -------------------------------------------------------------
    we travel not to escape life but for life not to escape us
    Don't fear failure, fear regret.

  • RE: Looking Back at the Summit

    "The leadership of PASS regularly changes, and we see that again this year with three new board members starting this January. I'd like to welcome John Martin, Diego Nogare, and Chris...

    -------------------------------------------------------------
    we travel not to escape life but for life not to escape us
    Don't fear failure, fear regret.

  • RE: How Far are You Willing To Go To Get Something?

    I like to say "Just because you can do that in SSIS doesn't mean you should."  I don't know how many data flow's I've looked at where I end up...

    -------------------------------------------------------------
    we travel not to escape life but for life not to escape us
    Don't fear failure, fear regret.

  • RE: Substring Question

    I'm sure this could be done in one statement, but I wanted to break it down into steps, maybe it would be easier to read.  This should only return...

    -------------------------------------------------------------
    we travel not to escape life but for life not to escape us
    Don't fear failure, fear regret.

  • RE: SQL Query (Merge Statement) Help

    I removed everything for @FilterTable since it was not used or needed for the MERGE statement.

    -------------------------------------------------------------
    we travel not to escape life but for life not to escape us
    Don't fear failure, fear regret.

  • RE: SQL Query (Merge Statement) Help

    The query looks to be working correctly to me.  You show the results you are expecting to have '7 Los Am 920786777 CA 7'.  But this record would not be...

    -------------------------------------------------------------
    we travel not to escape life but for life not to escape us
    Don't fear failure, fear regret.

  • RE: Substring Question

    Having the one with the leading '.' not return anything just didn't seem right.  So here is what I came up with:SELECT COALESCE(SUBSTRING(Name, 1, NULLIF(NULLIF(CHARINDEX('.', Name) -1, 0),...

    -------------------------------------------------------------
    we travel not to escape life but for life not to escape us
    Don't fear failure, fear regret.

  • RE: Trying to speed up this 'GetWorkingDays' function.

    Jason A. Long - Thursday, October 26, 2017 5:22 PM

    below86 - Thursday, October 26, 2017 3:25 PM

    -------------------------------------------------------------
    we travel not to escape life but for life not to escape us
    Don't fear failure, fear regret.

  • RE: Trying to speed up this 'GetWorkingDays' function.

    Jeff Moden - Thursday, October 26, 2017 5:19 PM

    below86 - Thursday, October 26, 2017 3:25 PM

    -------------------------------------------------------------
    we travel not to escape life but for life not to escape us
    Don't fear failure, fear regret.

  • RE: Trying to speed up this 'GetWorkingDays' function.

    Something about keeping the running 'work day' count in the table just feels wrong.  I know, get over it because it works and is faster.  So I decided to test...

    -------------------------------------------------------------
    we travel not to escape life but for life not to escape us
    Don't fear failure, fear regret.

  • RE: Compare 2 rows using tsql code

    Here is what I set up as data:
    CREATE TABLE dbo.source_table
    (
        RecordId                        INT IDENTITY(1, 1),
        First_Name                        CHAR(50),
        Last_Name                        CHAR(50),
        Date_Of_Birth                    DATE,
        Age                                INT,
        Process_Date                    DATETIME,
        Yearly_Salary                    DECIMAL(13, 2)
    )
    ;

    INSERT INTO dbo.source_table

    -------------------------------------------------------------
    we travel not to escape life but for life not to escape us
    Don't fear failure, fear regret.

  • RE: Compare 2 rows using tsql code

    I haven't used this code in several years, I think it will get you what you want. I see others have already provided answers though.  It does loop through the...

    -------------------------------------------------------------
    we travel not to escape life but for life not to escape us
    Don't fear failure, fear regret.

  • RE: Trying to speed up this 'GetWorkingDays' function.

    Jason A. Long - Friday, October 20, 2017 2:27 PM

    below86 - Friday, October 20, 2017 1:44 PM

    -------------------------------------------------------------
    we travel not to escape life but for life not to escape us
    Don't fear failure, fear regret.

  • RE: Trying to speed up this 'GetWorkingDays' function.

    Jason A. Long - Friday, October 20, 2017 12:37 PM

    I don't think there's any reason to keep sitting on what I have...

    -------------------------------------------------------------
    we travel not to escape life but for life not to escape us
    Don't fear failure, fear regret.

  • RE: Trying to speed up this 'GetWorkingDays' function.

    All I can say is your original function was doing a count not a sum, and it had two additional checks in the where clause compared to what I was...

    -------------------------------------------------------------
    we travel not to escape life but for life not to escape us
    Don't fear failure, fear regret.

Viewing 15 posts - 466 through 480 (of 844 total)