Forum Replies Created

Viewing 15 posts - 2,656 through 2,670 (of 8,731 total)

  • RE: reset counter by year / month / day

    Don't forget to add the year as well.

    An alternative to get both in a single function is to convert them to a string: CONVERT(char(6), yourDateColumn, 112)

    I'm not sure which approach...

    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 find postcodes with two spaces in the middle?

    HappyGeek (6/20/2016)


    EdVassie (5/27/2016)


    export it to Excel and do a simple find and replace

    What is wrong with

    UPDATE yourtable

    SET Postcode = Replace(Postcode, ' ', ' ')

    FROM yourtable

    WHERE postcode...

    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: Help me in adding dynamic pivot dates

    Please, post DDL and sample data. To know how to do it, read the articles from my signature.

    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: Simple CLR request

    Alan.B (6/18/2016)


    Con Alexis thank you sir. That's what I was looking for. Sorry for the late reply, yesterday was my birthday.

    Luis. It's for an article I'm working on. I have...

    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: Matching 2 separate UNPIVOT statements with Null Values

    Do you know what "at" was being used for in the first 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: Strange behavior with decimals

    Here's the formula applied for all values.

    WITH CTE AS(

    SELECT *,

    p1 - s1 + s2 + CASE WHEN 6...

    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: Strange behavior with decimals

    It's using the formula shown on BOL.

    Considering example 1.00 / 7.1 we just get the formulas.

    p = p1 - s1 + s2 + max(6, s1 + p2 + 1)

    s =...

    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?

    Lynn Pettis (6/17/2016)


    Steve Jones - SSC Editor (6/17/2016)


    Well, my navigations through the world of VSTS are complete, or at least, working.

    As much as I like the system, finding information 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: Matching 2 separate UNPIVOT statements with Null Values

    David92595 (6/17/2016)


    something is still off. None of the result show a followup with a NULL completed date

    Can you elaborate?

    Using the sample data, I get the expected results you posted. Is...

    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: Today's Random Word!

    crookj (6/17/2016)


    djj (6/17/2016)


    Ed Wagner (6/17/2016)


    Hugo Kornelis (6/17/2016)


    Revenant (6/17/2016)


    Manic Star (6/17/2016)


    ThomasRushton (6/17/2016)


    Luis Cazares (6/17/2016)


    Manic Star (6/17/2016)


    Root

    Cause

    Consequence

    game

    Minecraft

    Xbox

    Controller

    Pneumatic

    Lift

    Ski

    Monster (I wonder who gets the reference)

    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: Matching 2 separate UNPIVOT statements with Null Values

    Cross apply is the way to go. Check the following article which explains how to do it.http://www.sqlservercentral.com/articles/CROSS+APPLY+VALUES+UNPIVOT/91234/

    Here's an example. Be sure to understand it and ask questions that you might...

    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: Strange behavior with decimals

    This page might help you understand what's happening. https://msdn.microsoft.com/en-us/library/ms190476.aspx

    Especially the remark: "The result precision and scale have an absolute maximum of 38. When a result precision is greater than 38,...

    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: Hunting down bad code/ETL

    That's exactly why this won't have an easy solution. Each system is different.

    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: Today's Random Word!

    Manic Star (6/17/2016)


    Root

    Cause

    Consequence

    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: Simple CLR request

    Just curious on why you want to use CLR for this. I hope that you made that function just to make it easy to translate to procedural programming.

    If anyone else...

    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 - 2,656 through 2,670 (of 8,731 total)