Forum Replies Created

Viewing 5 posts - 1 through 5 (of 5 total)

  • RE: Correlated Joins Using "Apply"

    Alright, now I'm feeling like a rookie. I didn't notice the table alias' for the lvc on the output list. Sorry for wasting your time!

  • RE: Correlated Joins Using "Apply"

    Take it from the top!

    Ok. Sorry, I had a minor error in the WHERE Clause. I meant:

    SELECT

    lvt.ID,

    lvt.PhoneNumber,

    lvt.CreateDate,

    lvc.CallWindowStart,

    lvc.CallWindowEnd,

    lvc.LVCallDispositionID

    FROM

    LVTransaction lvt

    WHERE lvt.ID in ( --<<<<<<<<<<<<<<< THIS IS WHAT I MEANT

    SELECT...

  • RE: Correlated Joins Using "Apply"

    Ok. Sorry, I had a minor error in the WHERE Clause. I meant:

    SELECT

    lvt.ID,

    lvt.PhoneNumber,

    lvt.CreateDate,

    lvc.CallWindowStart,

    lvc.CallWindowEnd,

    lvc.LVCallDispositionID

    FROM

    LVTransaction lvt

    WHERE lvt.ID in ( --<<<<<<<<<<<<<<< THIS IS WHAT I MEANT

    SELECT top 3 *

    FROM LVCall...

  • RE: Correlated Joins Using "Apply"

    Andy, I didn't do the same thing noted in the article:

    --Correlated INNER JOIN Attempt

    SELECT

    lvt.ID,

    lvt.PhoneNumber,

    lvt.CreateDate,

    lvc.CallWindowStart,

    lvc.CallWindowEnd,

    lvc.LVCallDispositionID

    FROM

    LVTransaction lvt

    INNER JOIN

    (SELECT TOP 3 * FROM LVCall...

  • RE: Correlated Joins Using "Apply"

    Does a regular correlated sub-query perform the same thing?

    SELECT

    lvt.ID,

    lvt.PhoneNumber,

    lvt.CreateDate,

    lvc.CallWindowStart,

    lvc.CallWindowEnd,

    lvc.LVCallDispositionID

    FROM

    LVTransaction lvt

    OUTER APPLY --<<<<<<<<<<<<<< Replace OUTER APPLY with WHERE.

    (

    SELECT top 3 *

    ...

Viewing 5 posts - 1 through 5 (of 5 total)