Forum Replies Created

Viewing 15 posts - 1 through 15 (of 92 total)

  • RE: Date Parsing Update Question

    drew.allen (5/20/2016)


    Updating a table is expensive; altering a table is expensive. I updated your query without any updates and in ran in about 1/10 the time.

    ;

    WITH E(n) AS(

    ...

  • RE: Date Parsing Update Question

    Ok, I figured it out. It just took me a second to retrace the logic path the way it should be.

    Here is the completed project. This includes the second phase...

  • RE: Allias Usage Causes A Variance

    The DBAs just sent out an email alerting us to a corruption in today's refresh (reporting database is 1 day behind production transactional database). They completed repairs and I am...

  • RE: Allias Usage Causes A Variance

    CREATE SYNONYM [c_prd].[TCAS_HISTORY] FOR [DatabaseNameNotGiven].[dbo].[TCAS_HISTORY]

    This synonym is found in the same database listed for the DatabaseNameNotGiven value. I had SQL Server itself generate the code via right click > Script...

  • RE: Allias Usage Causes A Variance

    Select TC.Cas_ID

    From c_prd.TCASE TC

    Inner Join c_prd.TCAS_HISTORY TCH

    On TC.Cas_ID = TCH.Cas_ID

    Where TCH.CaseCloseDate Is Null

    Returns 9,816 records

    Select TC.Cas_ID

    From dbo.TCASE TC

    Inner Join dbo.TCAS_HISTORY TCH

    ...

  • RE: Allias Usage Causes A Variance

    Lynn Pettis (11/16/2015)


    What you don't say is if the database name in the synonym is the same database the view and tables are in or if it is a different...

  • RE: Blanking Out On How Joins Work

    djj (11/11/2015)


    As an aside what if you change

    TCC.Cntac_Dt >= Cast(Convert(Varchar,GetDate()-120,101) As DateTime)

    to

    TCC.Cntac_Dt >= Cast(DATEADD(DAY,-120, GetDate()) As Date)

    Good call. I was just trying to take off the time, and...

  • RE: Blanking Out On How Joins Work

    Luis Cazares (11/11/2015)


    jarid.lawson (11/10/2015)


    I've never had a left join react like that for me.

    Whenever using this syntax it will happen. You might have been very lucky for not encountering this...

  • RE: Blanking Out On How Joins Work

    SoHelpMeCodd (11/11/2015)


    An old article (one that I cut my teeth on :-D), but check out INF: How to Restrict the Inner Table of an ANSI Outer Join

    Thank you. That was...

  • RE: Blanking Out On How Joins Work

    Ding, ding, ding, ding, ding...We Have A Winner!

    The Where TCC.Cntac_Dt >= Cast(Convert(Varchar,GetDate()-120,101) As DateTime) clause is changing the LEFT JOIN into an INNER JOIN.

    I usually code it like this:

    Select TCH.Cas_ID

    ...

  • RE: Blanking Out On How Joins Work

    SQLBill (11/10/2015)


    The only thing I notice different between the two scripts is the check for date/time value in the second script. So that is where I would focus my...

  • RE: Blanking Out On How Joins Work

    Alvin Ramard (11/10/2015)


    What happens if you change:

    Where TCC.Cntac_Dt >= Cast(Convert(Varchar,GetDate()-120,101) As DateTime)

    to:

    Where ((TCC.Cntac_Dt >= Cast(Convert(Varchar,GetDate()-120,101) As DateTime)( OR (TCC.Cntac_Dt IS NULL))

    That leaves me at 423 still missing.

    Am I...

  • RE: SSRS Security Crash Course

    Crude back hacks don't bother me. I don't care how pretty it looks on the back end just as long as it does what I'm looking for.

    I want to make...

  • RE: [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied

    I found the solution. In case you ever have to troubleshoot this for your system, here are the steps I used to correct my specific issue.

    Root Cause: Invalid alias address...

  • RE: How To Find A Server Alias Name

    So that I am not leaving an unanswered question hanging out there...

    Let me first state that I was an idiot for forgetting this. I have not played with Aliases in...

Viewing 15 posts - 1 through 15 (of 92 total)