Viewing 15 posts - 106 through 120 (of 229 total)
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...
December 18, 2014 at 8:59 am
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...
December 18, 2014 at 8:56 am
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...
December 17, 2014 at 7:31 pm
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...
December 16, 2014 at 1:24 pm
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...
December 16, 2014 at 9:45 am
Just FYI there is a TSQL function which obviates the need for your case statement:
declare @age varchar(30) = null
select nullif(@age, 'null')
December 11, 2014 at 11:28 am
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,...
December 11, 2014 at 9:18 am
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...
December 11, 2014 at 8:50 am
Would a view work, with the row_number defined there?
December 10, 2014 at 1:14 pm
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...
December 10, 2014 at 12:35 pm
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...
December 9, 2014 at 12:14 pm
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...
December 8, 2014 at 4:14 pm
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...
December 8, 2014 at 2:47 pm
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...
December 8, 2014 at 1:34 pm
Viewing 15 posts - 106 through 120 (of 229 total)