Forum Replies Created

Viewing 15 posts - 3,331 through 3,345 (of 13,460 total)

  • RE: How can I add custome tag(Inserted, Updated, deleted) into column of status based on Insert, Update and Delete operation.

    maybe soemthing like this might help?

    you just need to test for the existence of any data int he INSERTED or DELETED virtual tables

    CREATE TRIGGER TR_WHATEVER_NOTIFICATIONS

    ON WHATEVER FOR INSERT,UPDATE,DELETE

    AS

    BEGIN

    SET NOCOUNT...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Mistery never ending query

    ricardo_chicas (6/4/2013)


    explain stale stats in a brand new table, with a brand new clustered index with a run of update stats a few minutes ago, again not a stats issue

    take...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Who Dropped Database

    this is a query i like to use, to get teh path for me easily:

    --SELECT * from sys.traces

    declare @TraceIDToReview int

    declare @path varchar(255)

    SET @TraceIDToReview = 1 --this is the trace you...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Mistery never ending query

    ricardo_chicas (6/4/2013)


    what version of 2012?

    again, it's not the version, it's most likely stale statistics, that we mentioned a few times; there's nothing in your example that is not done in...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Evaluating bit fields in SSRS

    dawidajm (6/4/2013)


    It is a boolean so I would imagine this is then evalutating IsState.Value <> False?

    i believe under the covers , false is zero, and true is anything not zero,...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Mistery never ending query

    nope, not a valid test/way to reproduce the issue.

    here's your exact code, but loaded with random data.

    on my machine, with all four versions of SQL Server I have installed...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Evaluating bit fields in SSRS

    i believe this is the equivalent; the first test is evaluating whether it's boolean, so the first part of your test is just checking if the value is zero...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: HOW TO EXECUTE 2-3 SQL STATMENTS ONE AFTER ANOTHER BASED ON THE RESULT OF PREVIOUS QUERY?

    here's a quick and dirty example, of how to get rows from the Oracle Linked server without copying the whole table, and then filtering, like a typical linked server query...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Mistery never ending query

    wow that's unusual, can you check for corruption? that might explain everything:

    dbcc checktable ('YourTableName') WITH ALL_ERRORMSGS

    DBCC CHECKDB (<Database Name>) WITH NO_INFOMSGS, ALL_ERRORMSGS

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Who Dropped Database

    the default trace has it,if not too much time has passed, since it only keeps the last 100 meg of changes

    fastest way to get to it is to right...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Mistery never ending query

    show the real query, and you can generate an estimated execution plan without running the query at all. just highlight the query and click the button for estimated execution plan.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: defferred name resolution

    Krishna1 (6/4/2013)


    Dear All

    I am using sql 2008 . While compiling the procedures it does not give error even if table not present.

    I need to trap this error. How to achieve...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Mistery never ending query

    if you have a specific performance problem, we really would want to see at least the estimated execution plan, and the actual query.

    when you abstract it out, you end up...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Compare 2 tables... How to do that???

    like this?

    SELECT

    snetworkname,

    REPLACE(sNetworkName,'.noc','')

    FROM WhatsUp.dbo.NetworkInterface

    RIGHT OUTER JOIN WhatsUp.dbo.device

    ON WhatsUp.dbo.NetworkInterface.nNetworkInterfaceID...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • RE: Critique - SQL Saturday Abstracts

    Brandi has a nice analysis;

    for this one:

    SQL Server Integration Services Recipes: (Beginner)

    I swept through forums to identify frequently asked questions posted by people getting started with SSIS. In this demo-centric...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing 15 posts - 3,331 through 3,345 (of 13,460 total)