Forum Replies Created

Viewing 15 posts - 376 through 390 (of 423 total)

  • RE: Fun with Outer Joins

    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...

  • RE: Calculate alphabetic sequence

    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...

  • RE: How to find a Query in all stored procedure

    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...

  • RE: Running a SQL script, without access to SQLCMD or similar?

    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?

  • RE: How do I show the output like (2000,2001)

    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...

  • RE: Design pattern for Phone

    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...

  • RE: Backup taking MUCH longer on prod HELP:)

    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...

  • RE: soundex function

    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,...

  • RE: Summarizing Imported Data

    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...

  • RE: Summarizing Imported Data

    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...

  • RE: PATINDEX and Regular Expression

    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...

  • RE: Split comma-delimited field for all rows in table

    @ 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...

  • RE: Split comma-delimited field for all rows in table

    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)

  • RE: T-SQL text manipulation and recordset iteration

    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...

  • RE: T-SQL text manipulation and recordset iteration

    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...

Viewing 15 posts - 376 through 390 (of 423 total)