Forum Replies Created

Viewing 15 posts - 6,961 through 6,975 (of 8,731 total)

  • RE: Replace a reserved keyword

    Ed Wagner (2/11/2014)


    The information_schema.columns table is an old system table, but it still supported. The replacement is sys.columns.

    Why do say this? the old system table is syscolumns.

    INFORMATION_SCHEMA views are...

    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: Performance Tuning Through Panic

    I believe that you need to add something to your steps.

    If you're panicking, take a deep breath, hold for a count of five, release. Repeat until you are 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: Replace a reserved keyword

    By the way, your SP is open to SQL Injection. I hope you are aware of that, but it could become a serious problem.

    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: Replace a reserved keyword

    If you're doing it on SSMS, you could use the magic of Ctrl+H to replace strings. just change Pivot to Pivoted and you'll be fine 🙂

    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: Top Talent Leaves

    Gary Varga (2/11/2014)


    Craig-315134 (2/11/2014)


    Gary Varga (2/11/2014)


    Craig-315134 (2/10/2014)


    ...but the Darwinistic nature of capitalism sooner or later weeds out the bad ones.

    Oh, I wish I found that to be the case!!!

    But it...

    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: dense_rank

    The most accurate response I can give you is: It depends.

    Both functions won't cause performance issues on their own, but could be used in an inefficient way and produce performance...

    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: Full Text Search and words with symbols

    Maybe this can help:

    Creating Custom Dictionaries for special terms to be indexed 'as-is' in SQL Server 2008 Full-Text Indexes

    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: Variable Table and insert multiple values from a function

    dquirion78 (2/10/2014)


    how is working the parameter (N)

    E1(N) is defining the name of the CTE (E1) and its column (N). You could easily remove it but you'll have to name 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: Variable Table and insert multiple values from a function

    dquirion78 (2/10/2014)


    thanks for second solution but for the moment I don't understand completely the function

    Read the article I posted, it has a nice explanation on how it works. Maybe you...

    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: Variable Table and insert multiple values from a function

    You could use the recursive query with no limits (it's part of the documented syntax).

    The default limit is 100 as a safenet because you shouldn't need more than that for...

    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: Variable Table and insert multiple values from a function

    Beware of recursive CTEs that count (like this one) as they could perform worse than a cursor or while loop (even if with 10 rows you can't note a difference)....

    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: Calc percent of count(1 value) to total

    Maybe something like this could help.

    SELECT (COUNT( NULLIF(value, 'yes')) --eliminates yes values

    / (COUNT(*) * 1.0)) * 100 AS no_percentage ,

    (COUNT( NULLIF(value, 'no')) --eliminates no values

    / (COUNT(*) * 1.0)) *...

    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: Import to MSSql from varying tab delimited text files

    Will the columns you need have the same name every time?

    If so, an alternative could be to use the header row to build a staging table, load the file into...

    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: row into column transform without pivot

    You still need to read the articles I posted to go further on this. I'm helping you with the template to create all the values. Your original query used 3...

    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 get max column name that meets certain criteria

    This seems like a weird design decision.

    You could use something like this.

    UPDATE A SET

    FLAGB2 = CASE

    WHEN [4.4] IS NOT NULL THEN 4.4

    WHEN [4] IS NOT NULL THEN 4

    WHEN...

    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 - 6,961 through 6,975 (of 8,731 total)