Forum Replies Created

Viewing 15 posts - 136 through 150 (of 194 total)

  • RE: Query ran slower than usual last night...

    DBAgal (1/26/2012)


    Below is part of the query structure. There are 14 CROSS JOINS and 5 INNER JOINS in the entire query. It touches many tables and...

  • RE: If value is null, then $0.00

    2 options.

    1. Use "ISNULL(field,0)" on each field.

    or

    2. Modify the table/load procedure to default a "0.00" on each field and mark as NOT NULL. This option will require...

  • RE: SQL Server Service Broker demystified

    Very well written article, I hope to see more about service broker in the future. As to implementations of Service Broker, basically it's only as complicated as you...

  • RE: service broker

    MasterDB (12/3/2011)


    Hi Experts,

    since two days am facing problem with service broker. its just like data is not dequeuing from queue.

    usually data should dequeued automatically,but since two days data is enqueing...

  • RE: Combine 2 Queries to work out percentage

    You need to add join criteria. so your query would be something like

    ...

    FROM A INNER JOIN

    B ON A.ID = B.ID

    WHERE...

  • RE: messages arriving in an odd order

    notoriousdba (10/25/2011)


    No, no different queues. All messages are going into the same service in the source database, to be delivered to the same service on the target database.

    Let me...

  • RE: Summation of amount in T-Sql

    I'm not an expert but I'd take a look at your joins. You join to Partnership which has multiple rows for ID 1, then join to the other tables...

  • RE: Help Converting While Loop to true Set Based

    Mike,

    For option 1, Use a view in place of the CTE. That's all it's doing is providing a query on the Data.

  • RE: Help Converting While Loop to true Set Based

    OP can correct, but it looks like you start at the top. Select the first row that is "D" and the first row of "A" that have matching DataKeys....

  • RE: Help Converting While Loop to true Set Based

    Kraig,

    I think what it's analyzing is on the whole find all pairs that match DataKey and have opposite Types. Any "orphan" or "single" DataKey is "Not a dup". ...

  • RE: Help Converting While Loop to true Set Based

    hm... not has hard as I might have thought...

    UPDATE #TestTBL SET DupInd = -2;

    WITH mycte AS (

    SELECT

    Row = ROW_NUMBER() OVER (PARTITION BY [datakey] ORDER BY [RecID]),

    [RecID], [DataKey], [DupInd]

    FROM

    #TestTBL

    WHERE

    TransCode = 'A'

    ),

    mycte2...

  • RE: Help Converting While Loop to true Set Based

    If I may, that won't be an easy one to do. You might want to have a look at the cumulative update or running total articles by Jeff Moden...

  • RE: Tally Table vs. While loop

    Here's the Query plan for both... it shows both batches.

  • RE: sql puzzle.

    Sounds like a home work question, so this is a very very basic SQL update with case statement. You should be able to start there.

  • RE: Store Procedure problem

    I found that XQuery tends to be slow... so when I've had to parse XML I used OPENXML and the edge tables to parse it... it's basically a 1 time...

Viewing 15 posts - 136 through 150 (of 194 total)