Forum Replies Created

Viewing 15 posts - 106 through 120 (of 1,183 total)

  • RE: Selecting a substring up to a specific (special) character

    OK Here's your answer.

    It's now time to understand it .... 🙂

    declare @yourTable table

    (i int identity (1,1), someStringField varchar(256))

    insert @yourTable

    values

    ('XXX_yyy_zzz_QQQ_...')

    ,('123_456_789_0aa_..._..._......._')

    ,('abc_def_ghi_jkl')

    ,('jhduthe_nsognfhdteigh_skweyur_ebgfvdn')

    SELECT

    i

    ,targetNode

    FROM

    (SELECT

    yt.i

    ,ROW_NUMBER() OVER (PARTITION BY yt.i ORDER BY N)...

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: Self referring join condition (tblx.col1 = tblx.col1) alters perf. - WHY?

    Ah, I hadn't thought about stats. I'll PM those guys cause this one has made me determined to solve it.

    Yes, there was a perf difference, I can't recall now. It...

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: Self referring join condition (tblx.col1 = tblx.col1) alters perf. - WHY?

    I'm gonna try one more time to bump this and see if someone can find the answer. :hehe:

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: Need help auditing

    Like Kraig said, there isn't any one-size-fits-all solution, but one thing I found a while back just might help you.

    The method described uses the system cache to find procs that...

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: Preventing from "create database" with data and log file on C: drive.

    Easiest way. Don't give them permissions to create databases.

    **I know that sounds like a smart-a$$ answer, but it's the best answer IMHO.

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: Selecting a substring up to a specific (special) character

    I thought I had posted this before, but here goes a second attempt.

    If you are sure that there are ALWAYS four parts, you can "Cheat" and use the PARSENAME function...

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: Advanced (?) SUM

    in addition to Sean's post.

    How do you determine the allocation of the frieght value of an order when the order has multiple atricles.

    i.e. Order # 2 has 5 articles (3...

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: Insert, Select on same table

    if my interpretation of your "same" references, it is highly likely that the "inserts and updates" in job (1) are locking the table. Why not move the steps in job...

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: Self referring join condition (tblx.col1 = tblx.col1) alters perf. - WHY?

    BUMP

    Does anyone have an idea on this?

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: Execution plan

    Did you rebuild statistics?

    I do believe that even though the servers may be configured the same/same hardware, when you restore a database the stats get "out of whack".

    I may be...

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: Self referring join condition (tblx.col1 = tblx.col1) alters perf. - WHY?

    Matt Miller (#4) (9/11/2012)


    Just a shot in the dark, but - how many have a NULL billingType?

    Zero, it's a NOT NULL column and the results are identical. [EDIT] And by...

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: Interesting solution needed

    I would suggest recreating the reports in SSRS. That would handle the "updating" when the reports are called. Sure, it will take some time to create the reports, but from...

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: Index Types

    Questions like these devalue the QOTD points all together. :ermm:

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: Arithmetic 1

    Good question, but I feel compelled to point out that all statements would fail on a Case Sensitive Collation because the variable @b-2 is declared, but @b-2 is referenced. Also...

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • RE: Averaging a turntime

    Jeremy... (2/24/2012)


    Jason Selburg (2/24/2012)


    One possible solution ...

    SELECT

    AVG(dbo.fn_Business_Days_Between_Dates(dbo.GetLocalDateTimeFunc(FM.OpenedDate),dbo.GetLocalDateTimeFunc(FA.receiveddate))*1.0)

    🙂

    Wow. That worked. I now have 3.500000. Is the built in function just not displaying any...

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg

Viewing 15 posts - 106 through 120 (of 1,183 total)