Forum Replies Created

Viewing 15 posts - 196 through 210 (of 254 total)

  • RE: How to test availability of a server in T-SQL

    The following is what I meant. As John pointed out, the error message is printed to the client, but odds are your client doesn't care and will not acknoledge that they...

  • RE: Inserting rows into a table from a string list; a better way to do it?

    Not much. I've posted this function before but its what we use for this situation. The performance benefit is that it eliminates one CHARINDEX call per loop. Of course, if you...

  • RE: storing variable in command file from SQL Server

    I'm assuming he knows how to pose the query using osql, but doesn't know how to get the result of the query into an environment variable for use in an...

  • RE: Breaking SQL insert

    As a side note, you can avoid the vast majority of such attacks by replacing ' with '' (two single quotes) within any data fields just prior to concatenating it...

  • RE: Kill Query running more then 5 hours

    I think you could use the "Use query governor to prevent queries exceeding specified cost" server setting to indirectly limit it. I'm not very familiar with it and so can't...

  • RE: Breaking SQL insert

    Yes. Suffice it to say that you can imbed SQL to cause issues if the fields are not sufficiently edited and you either know how the SQL is structured (an...

  • RE: Algorithams using T-SQL

    I've provided a function that uses a Split function we use. It works with the example provided but may not ultimately be what you need. You will have to determine...

  • RE: How to test availability of a server in T-SQL

    You could use a nested batch (dynamic SQL or a Stored Procedure) within your T-SQL batch to test the server. Assess the @@ERROR_CODE and return its value within an Output...

  • RE: Algorithams using T-SQL

    Yes, but its probably ugly. Create a function to do whatever string analysis you crave for determining your percentage and then call that function passing the string column as a...

  • RE: Excluding a Where and Order By clause based on a parameter value

    To be honest I didn't know you could either. I started my post for the temp table/exec thing but first decided to prove that a case didn't work in the ORDER...

  • RE: Overlapping date ranges

    declare @DateRanges table ( BeginDt datetime, EndDt datetime )

    INSERT INTO @DateRanges

          SELECT Begin_Date, End_Date FROM MyTable

     

    SELECT A.* FROM MyTable A

          WHERE 1 < ( SELECT COUNT(*) FROM @DateRanges B

                                  B.BeginDt...

  • RE: Help with Joins??!!

    Two things. One, you don't want to cast both columns because it will force a full index scan on both tables since you are manipulating the indexed value (SQL Server...

  • RE: Excluding a Where and Order By clause based on a parameter value

    There are two other possibilities for handling the order by. I've also included yet another option for dealing with the WHERE clause change, not that there is anything wrong with...

  • RE: Index scripts backups

    I think the following may be what you are after via EM. Someone has probably created a complex T-SQL to do this as well and with greater control, but I think...

  • RE: Data loss when using Begin Tran and Commit

    Transactions can span batches (a dynamic SQL submission or up to a GO). Apparently OLEDB did some integrity checking and assumed you didn't want to leave a transaction open after...

Viewing 15 posts - 196 through 210 (of 254 total)