Viewing 15 posts - 376 through 390 (of 423 total)
Good article. I just want to present a style of coding that prevents this situation. I often work with queries involving a dozen tables. Notice that each...
September 10, 2012 at 3:05 pm
Ouch this hurt my brain and took me an hour...but it is slick!
This converts from any base to any base, like hex to decimal or octal.
/*
William Talada
Define baseX and baseY
Pass...
September 6, 2012 at 4:05 pm
Searching the database for a query?? You mean not everyone uses VSS or TFS or other repository?
Personally, I use notepad++ for doing RegEx searches against the latest source code...
September 5, 2012 at 12:35 pm
Is your question about which apps submit tsql to sqlserver?
Or is your question about how to get rid of the need for dynamic sql?
August 30, 2012 at 2:43 pm
declare @Years table (ccyy varchar(4));
insert into @Years values (2010);
insert into @Years values (2011);
insert into @Years values (2012);
declare @Y varchar(max);
SET @Y = '('+(SELECT STUFF((SELECT ', ' + ccyy FROM (SELECT ccyy...
August 27, 2012 at 2:43 pm
You pose an interesting question. Are phones central to the application? Should a PersonPhone be grouped with a LocationPhone? Is a phone somewhat of an "attribute" of...
August 24, 2012 at 2:04 pm
I was backing up a customer's database in preparation for upgrading them when their backup job kicked in and dramatically slowed things down for both of us. Instead of...
August 23, 2012 at 12:48 pm
Here is my first attempt to make soundex more selective:
Algorithm sqlserver uses:
Replace consonants with digits as follows (but do not change the first letter):
b, f, p,...
August 23, 2012 at 12:17 pm
Storing your results in tables is a good idea; I just get once-and-done conversion tasks from new customers. The templates are sufficient for that. I really like using...
August 7, 2012 at 12:20 pm
You've made a good start. I tend to query each column separately as I'm doing a conversion using templates, especially since value distributions are extremely helpful. Each data...
July 27, 2012 at 2:01 pm
The following will determine which rows have valid numerics. If you need to convert the string to a number you may need another routine such as my BigInt converter.
declare...
July 6, 2012 at 5:37 am
@ Lynn Pettis
I don't remember you posting code for your 8k splitter. We all knew there was a general splitter function being used. It doesn't matter how it...
July 2, 2012 at 10:18 am
declare @t table (UserName varchar(3), ids varchar(10))
insert into @t values ('Tom', '1,2,3')
insert into @t values ('Sue', '4,5,6')
select *
from @t t
cross apply dbo.BuildKeyTableForDelimitedString(t.ids)
July 2, 2012 at 8:40 am
This is extremely simple and allows you to do whatever transforms you need. Don't worry about performance. It will be within milliseconds of anything else. Simplicity allows...
June 29, 2012 at 12:52 pm
I can save you a ton of trouble. Pass your string to this function and it will return a table of all the tokens in order. Then you...
June 29, 2012 at 11:37 am
Viewing 15 posts - 376 through 390 (of 423 total)