Forum Replies Created

Viewing 15 posts - 2,716 through 2,730 (of 7,191 total)

  • RE: SQL Agent Job execute only if rows don't exist

    You could put in a new step one and use the On success and On failure actions of the new step to govern what the job does next. That...

  • RE: Sort alphanumeric value based on condition

    SELECT ID

    FROM #John

    WHERE

    CASE

    WHEN ID NOT LIKE '%[A-Z]' THEN RIGHT('0000'+ID,5)

    ELSE RIGHT('0000'+ID,6+LEN(ID)-PATINDEX('%[A-Z]%',ID))

    END < '00020'

    If you're going to use it like this, you need to make sure you understand exactly how it works,...

  • RE: Sort alphanumeric value based on condition

    You're on the right track. This should work:

    CREATE TABLE #John (ID varchar(4)); -- if your column is char instead of varchar, this won't work

    -- Constraint to check numeric characters...

  • RE: mysterious slowdown every 4 minutes

    andrea.dimaio (4/4/2016)


    These are total waits time so writelog is always to the top. How can i monitor real time non cumulative waits time?

    Since they're cumulative since SQL Server started, you'll...

  • RE: mysterious slowdown every 4 minutes

    Good. Is that normal? In other words, do you see those WRITELOG waits all the time, or only while the system is running slow?

    John

  • RE: mysterious slowdown every 4 minutes

    It could be, but until you capture the wait stats, you're just speculating. Also, see whether you can capture sys.dm_os_waiting_tasks during that single second of slowness. If you...

  • RE: mysterious slowdown every 4 minutes

    You might want to capture wait stats as well. Since they're cumulative since SQL Server started, you'll need to subtract one set of figures from the next in order...

  • RE: Update trigger

    If you want the trigger to update those columns regardless of which columns are updated, just remove the IF clause altogether.

    John

  • RE: TSQL query slower with variable than hard-coded

    What is the data type of the Acc column? If it's not varchar(20), there may be some conversion going on. Please will you post the execution plans?

    John

  • RE: TSQL query slower with variable than hard-coded

    Does this happen every time, even after you clear the plan cache (don't do that on a production server, though)? Have you compared the execution plans for the two...

  • RE: Count patterns of behaviour

    pbo71465 (4/1/2016)


    ...as long as I didn't go beyond a certain range of Prime Numbers, the sum of these numbers would always be different.

    The only problem was there is the possibility...

  • RE: Handling spurious commas in csv

    Eamon

    Is there not an option in the Flat File Connection Manager in SSIS to overlook any delimiters that are enclosed in quotes? If not, I can't think of any...

  • RE: Count patterns of behaviour

    I don't know whether this is the most efficient way, but you could use bitmasks. In a separate table, assign a power of two to each action, for example...

  • RE: About index - What is the reason.

    The clustering key is the column, or set of columns, on which you choose to create your clustered index.

    Where did you read the term "heap index"? A table without...

  • RE: Query query_plan XML Column in a Table

    If you just want to find rows where query_plan contains those terms, convert to varchar(max) and use LIKE, CHARINDEX or PATINDEX. If you want to know where in the...

Viewing 15 posts - 2,716 through 2,730 (of 7,191 total)