Forum Replies Created

Viewing 15 posts - 1,321 through 1,335 (of 8,731 total)

  • RE: Querying Postcodes gracefully

    What about using an indexed computed column and simply query without spaces? Obviously that takes more storage space, but it might work.

    EDIT: Seems like Anthony had the same...

    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 flatten a normalised hierarchy table?

    j.gale1 - Tuesday, May 2, 2017 8:56 PM

    I have an OrgChart table that looks something like this:

    PositionCode   PositionName  ...

    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: Converting output to horizontal

    @Tyson 
    Don't use the first code you've got. Use the best. That doesn't mean that mine is the best. That only means that you need to test both to know...

    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: Converting output to horizontal

    Thom A - Tuesday, May 2, 2017 1:05 PM

    I was honestly wondering how long it would be before you came along with...

    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: Converting output to horizontal

    Here's a different option that doesn't require to pivot and unpivot. I'm using a temp table but it could be written as a CTE or derived table, although I'm not...

    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: Invalid length paramter passed to substring function

    This only happens when using only literals. If you're using literals, there's no need to have complex logic. So, here are some examples on how to avoid errors or 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?

    jasona.work - Tuesday, May 2, 2017 6:31 AM

    Brandie Tarvin - Tuesday, May 2, 2017 4:30 AM

    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: CASE, CONVERT NULL to 'Unknown' in a column with a datatype of int.

    m.richardson.home - Tuesday, May 2, 2017 3:41 AM

    You could try something like this:-

    select coalesce(convert(varchar(10),[Days Since Account Logon]),'Unknown') as [Days Since...

    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: Newbie question about access

    kangarolf - Tuesday, May 2, 2017 5:08 AM

    Hi all,

    We run a shared application in IIS on .net. I am looking for a...

    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: Why DECLARE doesn't work?

    kkbear - Monday, May 1, 2017 9:41 AM

    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?

    <rant>
    Have you ever encountered a situation where your company defines certain authorized software and you need to change what you've been using for so long that it's an essential...

    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: SQL Query Running Count

    ChrisM@home - Friday, April 28, 2017 10:22 AM

    ROW_NUMBER() OVER(PARTITION BY Name ORDER BY Date)

    Exactly, the simplest way is the best. It'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: Unpivot column to rows dynamic sql

    Jason A. Long - Friday, April 28, 2017 7:50 AM

    Here's a slightly different option that concatenates the the column name in a...

    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?

    jonathan.crawford - Thursday, April 27, 2017 12:26 PM

    Do you work where I work? Happened last week, initial question was "is this 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

Viewing 15 posts - 1,321 through 1,335 (of 8,731 total)