Forum Replies Created

Viewing 15 posts - 4,756 through 4,770 (of 7,610 total)

  • RE: How to trim sql query

    From a performance standpoint, do this, get rid of the functions against the column in the WHERE clause to allow max possible use of all indexes. Always avoid functions...

  • RE: Free form text parsing suggestions

    drew.allen (9/30/2015)


    ScottPletcher (9/30/2015)


    Yikes. Here's an alternative that should perform better for you:

    Part of the reason that XML string splitters are inefficient is converting character separated strings to a format...

  • RE: Free form text parsing suggestions

    jguffey (9/30/2015)


    Thank you both for the replies.

    Scott, can you explain dbo.tally and t.tally. I'm not sure I understand what they are or what I need to do to create that...

  • RE: Free form text parsing suggestions

    Yikes. Here's an alternative that should perform better for you:

    select STUFF(

    cast((select ' ' + SUBSTRING(spt.notes, t.tally + 3, CHARINDEX('</p', spt.notes, t.tally + 3) - (t.tally...

  • RE: Help with syntax

    You need to CAST another column to varchar, since it's an int, as was done with billpay:

    select '"'+cast([ssn] as varchar(11))+'","'+ [username]+'","'++'","'+cast([estatement] as varchar(100))+'","'+ CAST([billpay] AS varchar(12))+'",'from @people

  • RE: Syntax help please in creating an index

    Carefully review what the best clustered index for this table would be. It's extremely like that all, or some, of the keys in your planned new index should actually...

  • RE: Time posted does not indicate time zone

    You're right. I hadn't search thru the Profile settings before, but time zone was in there, and was somehow wrong for my location.

  • RE: Convert Cursor to a Recursive CTE or a normal Query

    NOT EXISTS might also be an option here.

    I don't see anything in the original code that indicates that Blocked or Doc Type must match in the CR Log, but naturally...

  • RE: Pagination in T-SQL to be done on 50000 records . Display 20 rows at single time

    Unfortunately I can't get the files from my web link at work due to internal issues (seemingly neverending!).

    Rather than actual partitioning, try clustering the table on CustomerID, start date and...

  • RE: cluster node licensing

    Not if: (1) you have software assurance on the active node and (2) it is truly passive.

    From MS's licensing docs [emphasis added by me]:

    "

    Beginning with SQL Server 2014, each active...

  • RE: ForeignKey points to not the most appropriate index of the referenced table

    SQL's priority is to use the index with fewer pages, because of less I/O which equal less overhead. Thus, to link FKs to the clustered index, you need to...

  • RE: TRY CATCH and ROLLBACK question...

    You would need an explicit transaction. In fact, the ROLLBACK itself will give you an error unless a transaction is active, so even with an explicit trans, you need...

  • RE: Find characters before and after _

    SELECT LEFT(column_name, CHARINDEX('_', column_name + '_') - 1) AS before_underscore,

    SUBSTRING(column_name, CHARINDEX('_', column_name + '_') + 1, 2000) AS after_underscore

    FROM table_name

  • RE: Dynamic SQL Question

    Luis Cazares (9/21/2015)


    WayneS (9/21/2015)


    Kristen-173977 (9/20/2015)


    GilaMonster (9/19/2015)


    protecting against SQL Injection is done, in most cases, by ensuring that it is parameterised, except for the rare scenario where the user input...

  • RE: Error while rebuild indexes

    This really looks like a trigger. Check for db-level (DDL) triggers. If not, check for server-based triggers (that seems unlikely in this case, though). For example:

    SELECT t.*

    FROM...

Viewing 15 posts - 4,756 through 4,770 (of 7,610 total)