Forum Replies Created

Viewing 15 posts - 5,686 through 5,700 (of 8,731 total)

  • RE: Fun Data Analysis

    This editorial reminded me of this site:

    http://www.tylervigen.com/

    Did you now that US spending on science, space, and technology correlates with Suicides by hanging, strangulation and suffocation? Or that Divorce rate in...

    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: Removing Non-Alphabetical Characters

    I see what went wrong. The site converted the xml space tag into a space.:w00t:

    Other than that, could you explain the output that you need for "O'Gara^^#D"?

    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: Another Issue with Stored Procedures

    You're not sending enough parameters to your stored procedure. You need to either execute your procedure with all the parameters or assign defaults to your parameters. Even better would be...

    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: Parsing data from single column into multiple columns

    You just need this:

    SELECT REPLACE( PARSENAME( REPLACE( REPLACE( regstratn6, '.', CHAR(7)), ' ' , '.'), 3), CHAR(7), '.') City,

    REPLACE( PARSENAME( REPLACE( REPLACE( regstratn6, '.', CHAR(7)), '...

    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: Removing Non-Alphabetical Characters

    Erin Ramsay (10/9/2014)


    To avoid results like O'GaraD you're going to have to employ logic such as (possibly):

    Any characters that occur BEORE or AFTER an invalid character are also explicitly invalid....

    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: Dynamic order by clause without a case when statement

    Freefall99 (10/9/2014)


    Luis Cazares (10/9/2014)


    Your best option would be to sort the results in the front end.

    Using a scalar function is a great performance problem.

    Using Dynamic code can be safe if...

    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: Parsing data from single column into multiple columns

    No, I created the CTE with the sample data to have something to run the code on.

    You should use your table instead of the CTE.

    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: Get the latest per one column

    You're welcome.

    The most important part here is that you understand the code, what it does, how and why it works.

    If you have any questions, feel free to ask. If something...

    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: Dynamic order by clause without a case when statement

    Your best option would be to sort the results in the front end.

    Using a scalar function is a great performance problem.

    Using Dynamic code can be safe if used correctly.

    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 help

    Does this article gives you an idea?

    http://www.sqlservercentral.com/articles/T-SQL/62867/

    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: How to rewrite that query using a pivot - And optimizie the query

    This isn't tested at all because you didn't post all the tables involved nor sample data. The method used is described in here: http://www.sqlservercentral.com/articles/CROSS+APPLY+VALUES+UNPIVOT/91234/

    SELECT E.[Part No#],

    ...

    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: Get the latest per one column

    Or maybe you want your own version for anything that I can't see in your post.

    WITH CTE AS(

    SELECT * ,

    ...

    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: Get the latest per one column

    You're posting on a 2014 forum so maybe other alternatives are available.

    Here's one option.

    WITH CTE AS(

    SELECT * ,

    ...

    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: Parsing data from single column into multiple columns

    This is an option using PARSENAME and some REPLACEs.

    WITH SampleData(regstratn6) AS( SELECT

    'ABERDEEN SD 57401-3580' UNION ALL SELECT

    'ABINGDON VA 24210-5011' UNION ALL SELECT

    ...

    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: how do i allow only specific ip address to connect to my sql server

    GilaMonster (10/9/2014)


    please don't ask me how I know about these

    I won't, it sounds like an awful nightmare for the person in charge.

    I wasn't expecting that someone would expose their SQL...

    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,686 through 5,700 (of 8,731 total)