Forum Replies Created

Viewing 15 posts - 5,551 through 5,565 (of 8,731 total)

  • RE: Sorting out capitalisation

    This is a common topic and the functions have pros and cons.

    Here's a function by Jeff Moden that will run amazingly fast despite being a scalar function.

    CREATE FUNCTION [dbo].[InitialCap](@String...

    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: In vs =, performance considerations

    There's no difference. SQL Server will interpret them as the same query.

    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: Query to find "games behind" in a sports table

    measterbro (11/12/2014)


    Thank you for your reply.

    Your query works but it only uses wins for the calculation.

    In this example:

    WLGB

    B410

    A253

    The "games behind" are found by subtracting Team A wins from Team B...

    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: Missing members in a table.

    You should use error files to identify those rows an understand why they're missing.

    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: Query to find "games behind" in a sports table

    Maybe something like this could help you.

    WITH GamesWon AS(

    SELECT Lge,

    GameDate,

    HomeTeam...

    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: TSQL "where - 101"

    It's a nice question that might confuse some newbies. It's important to study the logical operators and the results given.

    I'd love to see in the explanation that the correct answer...

    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: Remove Characters

    Why do I always forget the safety net? I live on the edge. :hehe:

    DECLARE @x table (y varchar(100));

    INSERT INTO @x VALUES

    ('ReportServer-SalesOrders'),

    ('ReportServer-OKLA-SalesOrders'),

    ('SalesOrders');

    SELECT REVERSE(left(REVERSE(Y), charindex('-', REVERSE(y) + '-')-1)) ,

    ...

    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: Remove Characters

    Here are 2 additional options:

    Note that PARSENAME can return incorrect results if you have dots in your values or if you have more than 4 sections.

    DECLARE @x table (y varchar(100));

    INSERT...

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

    You don't need a loop. You need a really fast splitter which you can find in the following article: http://www.sqlservercentral.com/articles/Tally+Table/72993/

    Once you split the data, you just need some cross tabs...

    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: AVG(DateDiff) in one line?

    Sometimes we miss the little details and just need a different point of view.

    Glad I could help.

    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: AVG(DateDiff) in one line?

    jennigirl (11/10/2014)


    I am trying to pull a report with average down time and I getting the error message "Msg 195, Level 15, State 10, Line 4

    'AVG' is not a recognized...

    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: What's wrong with this query???

    I can't find the documentation, but I'm sure that it's because that's a parsing error while the others are execution errors.

    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: View and Delete Statement

    Your question seems incomplete.

    You can modify data in SQL Server using views with some restrictions, check the following article: http://msdn.microsoft.com/en-us/library/ms180800.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: The 2014 PASS Summit Report - Day 1

    Doctor Who 2 (11/6/2014)


    Hi Steve (or anyone else at the PASS conference), what you wrote suggested to me that people could see at least some of the presentations online. How...

    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?

    Sean Lange (11/6/2014)


    I am back. Had a major project get deployed 2-3 weeks ago. This was a complete top to bottom rewrite of our ecommerce system that took nearly 2...

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