Forum Replies Created

Viewing 15 posts - 6,826 through 6,840 (of 8,731 total)

  • RE: Dynamic Sql - Must declare the scalar variable

    You seem to have a CROSS TABS or PIVOT problem that you're trying to solve using a CURSOR :sick: .

    Reviewing your code, you're adding an integer to a varchar...

    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: Avoiding Row work in SQL - Part 2

    You can't chage that code to make it set based. You need to change the code from usp_make_record to accept several rows at a time.

    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: Job interview question (DBA/Developer)

    DaveDB (2/24/2014)


    1) How to handle slow moving database, (when your boss comes over to your desk and asks you to find out why production is moving slowly).

    Catch it before 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: Want to include columns without using group....

    You might want to take a look at the OVER Clause.

    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: Need HELP on query

    Here's an option that you could use. Be sure to understand what it does before implementing it. If you have any questions, feel free to ask.

    SELECT e1.RISK_FACTOR,

    CASE WHEN RISK_FACTOR =...

    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: yippee i passed!!

    Congratulations!

    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: Need help with this query

    sqldriver (2/21/2014)


    Luis Cazares (2/19/2014)


    sql2k8 (2/19/2014)


    I have to rewrite the code in another language. This correlated subquery is not working in the another language. So i am trying to rewrite 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: finding break in sequence

    That is usually solved like this:

    WITH CTE AS(

    SELECT id, id - ROW_NUMBER() OVER (ORDER BY id) grouper

    FROM #test1

    )

    SELECT MIN(id) min_id, MAX(id) max_id

    FROM CTE

    GROUP BY grouper

    ORDER BY min_id

    I just noticed that...

    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: DateAdd Convertion Problem

    To be fair, (s)he might be in a different time zone.

    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: DateAdd Convertion Problem

    You're welcome.

    Do you understand how and why it works?

    I also missed the link in my previous post. Here it is: How to Make Scalar UDFs Run Faster (SQL Spackle)[/url]

    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 PIVOT HELP

    Duplicate post answered in here: http://www.sqlservercentral.com/Forums/Topic1543925-391-1.aspx

    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: finding break in sequence

    Here are a couple of options that you could try.

    SELECT t.id,

    t.[FILE_NAME],

    CASE WHEN NOT EXISTS( SELECT 1 FROM test1 x WHERE t.id = x.id + 1)

    THEN 'D' ELSE 'F'...

    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: Error message - aggregate function and group by clause

    It's great to read all that. If you need more help, don't hesitate on coming back. We're here to help and hopefully you'll end up helping once you get used...

    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: Dumb interview answers

    jshahan (2/20/2014)


    Yet another had her own form of on-line help: Turned out she was calling her boyfriend for technical assistance when we left her alone. At least she turned...

    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: Sum values on periods

    MyDoggieJessie (2/20/2014)


    Very creative Luis, kudos!

    Thank you! It became clear after realizing it wasn't a running total.

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