Forum Replies Created

Viewing 15 posts - 6,151 through 6,165 (of 8,731 total)

  • RE: Is It Time To Clear Out Those Quirky Functions?

    Could a second parameter be added to ISNUMERIC to determine a specific numeric type?

    I'd love a wildcard REPLACE as well.

    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?

    SQLRNNR (7/9/2014)


    Koen Verbeeck (7/9/2014)


    GilaMonster (7/9/2014)


    WHERE Coalesce(NotNullableColumn,-1) = 0

    and CategoryID = @CategoryID

    Group By CategoryID

    ......

    Imo there is not necessarily something wrong with the group by.

    The coalesce on the other hand is 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: using count(*) and case in on statement

    That's one select statement 🙂

    Do you mean something like this?

    SELECT 'ClassSize' = CASE

    WHEN COUNT(studentid) < 10

    ...

    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: Not sure how to write this query without cursors and/or dynamic sql

    Hardy21 (7/9/2014)


    Luis Cazares (7/8/2014)


    Are we supposed to do your work?

    +1

    Or do you have something done already?

    Please share if you have already done something.

    There are options like CTE, Self -...

    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?

    GilaMonster (7/9/2014)


    WHERE Coalesce(NotNullableColumn,-1) = 0

    and CategoryID = @CategoryID

    Group By CategoryID

    ......

    What where they thinking? They need to use ISNULL to preserve the data type from the column. :hehe:

    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: Pivot help? ...or other approach?

    I'm Batman shhh.... No, really, I'm a billionaire and philanthropist called Bruce Wayne. 😀

    I just found that helping in here keeps me learning and practicing to become better each day....

    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: Not sure how to write this query without cursors and/or dynamic sql

    It seems that you need joins or semi-joins (EXISTS).

    I can't see the complexity and you didn't even provide sample data and expected results. You've been here for some time and...

    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: Not sure how to write this query without cursors and/or dynamic sql

    Are we supposed to do your work? Or do you have something done already?

    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: Multi-valued parameter with In clause in SP

    I assume that you didn't read the article proposed by Craig. Read it and find out a way to improve the 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: Pivot help? ...or other approach?

    I came up with 2 solutions, but I changed the pivot to a cross tabs approach. I prefer cross tabs because they give more flexibility and with more than one...

    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: Changing server name - all procs, views, functions, etc

    How does the different name for Server, instance or database affect you? Do you make reference to them in your code/object definitions?

    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: Pivot help? ...or other approach?

    And what do you need?

    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: Pivot over multiple columns using the 1.1, 1.2, 2.1, 2.2 sequence

    This seems to give the same results as your query. The problem is that you need a single row number, instead of having to calculate a different row number 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: This Query is Filling up TEMPDB

    The reason might be the DISTINCT which has to sort all the values to eliminate duplicates. Another reason might be the OR you have in there which might be causing...

    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: Trying to get Null values while also using MAX

    I might be wrong, but this is a shot in the dark. Aggregate functions (including MAX) exclude null values. If you're using MAX() and replacing it with '1900-01-01' the most...

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