Forum Replies Created

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

  • RE: Join with where clause?

    Thanks. So specifying A.A = 1 will return all matches for AD.A = 1 , but only distinct rows from the rest of A?

  • RE: Join with where clause?

    Yes - having played with test data I've now realised that. Thanks for the reply.

    However, I came across another strange thing. Using test data:

    Table A

    ID

    1

    2

    Table AD

    ID     ADID

    1     1

    1     2

    2     3

    2    ...

  • RE: Join with where clause?

    How do LEFT JOINS and WHERE clauses work when you include a CASE stsement in the SELECT clause?

    e.g 

    SELECT

      O.OrderNo,

      CASE WHEN A.TopUpLoan = 1 THEN A.VehAmt ELSE 0 END As...

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