Forum Replies Created

Viewing 15 posts - 5,956 through 5,970 (of 8,731 total)

  • RE: Determine which pattern comes first in a string<!-- 864 --><!-- 864 --><!-- 864 --><!-- 864 -->

    I'd also remove the CASE (which doesn't seems to match the pattern search) and include it in the APPLY results.

    WITH cteString ( ArtifactID, PATH )

    ...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Determine which pattern comes first in a string<!-- 864 --><!-- 864 --><!-- 864 -->

    It might be because you don't need the brackets to escape the underscore.

    The other problem is because if the pattern is not found, then you'll get a zero as the...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Determine which pattern comes first in a string<!-- 864 --><!-- 864 --><!-- 864 -->

    I just wanted to note that the performance of DelimitedSplit8K function won't be affected if it receives a varchar(max) as input. It will, however, truncate the string to a 8000...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Determine which pattern comes first in a string<!-- 864 --><!-- 864 --><!-- 864 --><!-- 864 -->

    I'm not sure if this can work for you. Seems simple but I can't guarantee performance.

    WITH cteText(string) AS (

    SELECT 'oh_look_at_this.thing.his\hers_stuff\mine.craft\yours_protein' UNION ALL

    SELECT 'i.am.a._thing.hers\his_things\mine.refrigerator\yours_potato' UNION ALL

    ...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Counting how many times a value appears in a column and assigning an incremental number to each one.<!-- 864 -->

    Ed Wagner (8/20/2014)


    Lynn Pettis (8/20/2014)


    Lynn Pettis (8/20/2014)


    Ed Wagner (8/20/2014)


    This is one of the great things about this site. A question gets posted and several working solutions get posted. ...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: force using a specific SQL Server/Instance in T-SQL<!-- 864 -->

    Why don't you remove permissions to developers on production?

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Calculating Percentage

    Maybe something like this:

    SELECT StudentID,

    FirstName,

    Course ,

    Score ...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Counting how many times a value appears in a column and assigning an incremental number to each one.

    hamptonmom2009 (8/19/2014)


    I have about 305K lines. 🙂

    Why is that a problem? Or it isn't?

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Mass removal ofF permissions

    How about using another column on the spreadsheet to generate the (revoke?deny?) statements by concatenating some values?

    Then you'll just need to copy that column and execute it.

    It's just a thought.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Why are my SSIS data flow steps using a CURSOR to transfer data?

    Scott Coleman (8/19/2014)


    I just reread your original post. For data transfer between databases on the same server, the Execute SQL task with INSERT/SELECT should be faster than an SSIS...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: present yyyymm in format good for calcuation

    I was just trying to group a table by weeks. My manager told me to use a table like the following (I've changed the names and I have no control...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Are the posted questions getting worse?

    Lynn Pettis (8/19/2014)


    How about this one, starting monthly salary of $4,927 for a Senior Database Developer. That's 2/3 what I made at School District 11.

    Granted, it is a non-profit...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: present yyyymm in format good for calcuation

    CELKO (8/19/2014)


    I'm working on setup where we have period like 201401 ( jan 2014), etc... And it is INTEGER , however it doesn't help if you need to...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Poor T-SQL code runs for over 10 hours !!! Help appreciated....

    garry.lovesey (8/19/2014)


    This is RBAR processing at its worst !!!

    You're absolutely right. This was made by someone who heard that cursors were bad and replaced them with while loops.

    If you can...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: sql question

    No, the expression inside a COUNT() will only matter if it can return null values. Otherwise, is the same to use a constant, an asterisk or any non nullable column....

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2

Viewing 15 posts - 5,956 through 5,970 (of 8,731 total)