Viewing 15 posts - 3,991 through 4,005 (of 7,597 total)
Maybe something like this?:
select textid, textline,
SUBSTRING(textline, percent_byte - length_of_percent + 1, length_of_percent) as percent_amount
from #T
cross apply (
select...
January 4, 2017 at 10:04 am
Jeff Moden (12/28/2016)
ScottPletcher (12/28/2016)
December 28, 2016 at 9:40 am
Jeff Moden (12/27/2016)
ScottPletcher (12/27/2016)
December 28, 2016 at 8:03 am
How do you query that table, and how does it join to other tables? If it's by BankAccount, then definitely cluster by BankAccount value. If you need to...
December 27, 2016 at 11:00 am
100% agree. Definitely define as index as "UNIQUE" whenever possible.
December 27, 2016 at 10:56 am
Jeff Moden (12/26/2016)
Sergiy (12/15/2016)
ScottPletcher (12/15/2016)
Pretty soon you'll see in queries "WHERE Status&8 >0".
I guess I don't see why that's so much worse than a non-bit comparison of "status =...
December 27, 2016 at 7:20 am
Here's the in-line code, hopefully it's trivial to convert it to an itvf once its logic has been verified:
DECLARE @baseDate DATETIME = '1/1/2006 07:00:00';
SELECT
@baseDate AS...
December 23, 2016 at 9:48 am
If the flag is significant enough, make it the first column in the clustered index. For example, in a 90%-10% situation where you mostly process the 10%.
Be aware that...
December 21, 2016 at 10:46 am
m.sams (12/16/2016)It seems to me that one could remove the primary key index and create a new unique non-clustered index and then add the necessary include columns and have a...
December 20, 2016 at 1:55 pm
No, not unless you have an explicit BEGIN TRANSACTION outside of that code. By default, each statement is automatically committed once it completes.
December 15, 2016 at 4:05 pm
Sioban Krzywicki (12/15/2016)
ScottPletcher (12/15/2016)
Pretty soon you'll see in queries "WHERE Status&8 >0".
I guess I don't see why that's so much worse than a non-bit comparison of "status = 8"...
December 15, 2016 at 9:13 am
Pretty soon you'll see in queries "WHERE Status&8 >0".
I guess I don't see why that's so much worse than a non-bit comparison of "status = 8" or "code1 =...
December 15, 2016 at 9:02 am
I'll offer a "template" approach just as a possible alternative. Often I find it easier because I get a better visualization of the desired result up front than from...
December 14, 2016 at 2:25 pm
CELKO (12/13/2016)
It wouldn't be SSN, because (1) that can change and (2) it might not technically be legal in certain use cases for a private company to use that.
Yes,...
December 14, 2016 at 9:04 am
You could also have another table that documented the bit value meanings. Here's a quick-and-dirty example, would obviously need fleshed out quite a bit more:
CREATE TABLE dbo.bit_values_master (
...
December 13, 2016 at 3:04 pm
Viewing 15 posts - 3,991 through 4,005 (of 7,597 total)