Forum Replies Created

Viewing 15 posts - 106 through 120 (of 230 total)

  • RE: Bit Casting

    DonlSimpson (12/18/2014)


    Interesting that the text 'false' evaluates to 0. I would have guessed that any non-empty string would evaluate to 1.

    Just to add insult to injury, if you try...

    Executive Junior Cowboy Developer, Esq.[/url]

  • RE: Bit Casting

    Stewart "Arturius" Campbell (12/17/2014)


    Nice one, thanks Gabe.

    Have used this before, where the values were stored as true / false strings in the mainframe.

    No. I actually found out the "true"/"false" functionality...

    Executive Junior Cowboy Developer, Esq.[/url]

  • RE: String Checking

    My guess is there's probably a better way to formulate the problem you're trying to solve so that this isn't required, but for the sake of argument, lets say that...

    Executive Junior Cowboy Developer, Esq.[/url]

  • RE: "Remove Clutered property" from PK

    What is it you're trying to optimize for while doing this? You mentioned "rebuilding FK"s several times, which isn't really a thing. Are you trying to keep up-time on the...

    Executive Junior Cowboy Developer, Esq.[/url]

  • RE: "Remove Clutered property" from PK

    Perhaps make a brand new table with the structure you want (the new pk and any fk constraints) and populate it with all your data.

    For instance, given your old table...

    Executive Junior Cowboy Developer, Esq.[/url]

  • RE: CSV file for null

    Just FYI there is a TSQL function which obviates the need for your case statement:

    declare @age varchar(30) = null

    select nullif(@age, 'null')

    Executive Junior Cowboy Developer, Esq.[/url]

  • RE: Use row_number() as default value of table column

    That's correct. If you do it through a view, anyone calling that view who doesn't know what's going on will experience it as any other column, but as you say,...

    Executive Junior Cowboy Developer, Esq.[/url]

  • RE: Use row_number() as default value of table column

    This is just combining what I said and what Sean just said, but you can either apply the row number when you generate the report, or create a view with...

    Executive Junior Cowboy Developer, Esq.[/url]

  • RE: Use row_number() as default value of table column

    Would a view work, with the row_number defined there?

    Executive Junior Cowboy Developer, Esq.[/url]

  • RE: get the earliest date??

    Aww, I thought it was clever 🙂

    Executive Junior Cowboy Developer, Esq.[/url]

  • RE: get the earliest date??

    Any way you slice it this isn't going to be super costly, but another spin on it would be to use aggregate functions rather than case or inequality statements. This...

    Executive Junior Cowboy Developer, Esq.[/url]

  • RE: Adding new varchar (30) field to table causes stored procedure to take 10 times more time

    Where did you read nolock is deprecated?

    Not that I'm encouraging use of nolock, but I see it's deprecated in from clauses in updates and inserts, but not straight selects. Unless...

    Executive Junior Cowboy Developer, Esq.[/url]

  • RE: interest rate charges calculation in sql

    There may be a stealthier way to do this without the need for a tally table, but one doesn't come to mind at present. Here's how I'd attack it:

    Create a...

    Executive Junior Cowboy Developer, Esq.[/url]

  • RE: Adding new varchar (30) field to table causes stored procedure to take 10 times more time

    Look at the final batch of that plan and you'll see it supports exactly what I said. 84% of the cost if coming from a clustered index lookup for the...

    Executive Junior Cowboy Developer, Esq.[/url]

  • RE: Adding new varchar (30) field to table causes stored procedure to take 10 times more time

    Just to elaborate on my theory (and it is just that) what I think might be going on is that the index I mention (the one with a bunch of...

    Executive Junior Cowboy Developer, Esq.[/url]

Viewing 15 posts - 106 through 120 (of 230 total)