Databases

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • get everything from table A that is not in table B

    1 answers - 715 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    Hi,
    I have a table Rates(date,maturity,rate) in which are downloaded rates
    for different maturity points, say 1YR, 2YR, 3YR and so on. I wish to
    write a query that would provide me if there were more or less maturity
    points downloaded between two days.
    So lets say on day1 I downloaded
    1 YR -100
    2 YR -200
    3 YR -300
    and on day2 I downloaded
    2YR -200
    3YR -300
    4YR -400
    at the end, the query should produce two results (the rates themselves
    are not too important)
    Result1 -"Exists in Day1 but not in Day 2"
    1YR
    Result2 -"Exists in Day2 but not in Day1"
    4YR
    What is the best way to write this query?
    Thanks.
  • No.1 | | 102 bytes | |

    select A.curveId
    from A left outer join B
    N(A.id=B.id
    where (B.id is NULL)

Re: get everything from table A that is not in table B


max 4000 letters.
Your nickname that display:
In order to stop the spam: 0 + 9 =
QUESTION ON "Databases"

EMSDN.COM