• You are doing a Cross join so what will happen is that you will get T1 rowcount * t2 Count

    Eg if you had 2 rows in T1 and 4 in T2 you would get 8 rows returned with data something like this returned

    T1 T2

    1 1

    1 2

    1 3

    1 4

    2 1

    2 2

    2 3

    2 4

    To turn it into an Inner join you need to do

    Select Col1, Col4

    From T1,T2

    Where

    T1.Col1=T2.Col3

    Or a Left Join then this

    Select Col1, Col4

    From T1,T2

    Where

    T1.Col1*=T2.Col3

    for a right outer the clause is =*, Unfortunately I cant remember the syntax for a Full outer.

    I believe this style of left/right outer join syntax (*= etc) is being depricated over the next couple of releases of SQL server, in 2008 there is a server setting to allow the syntax, im not sure about SQL 2012 though

    _________________________________________________________________________
    SSC Guide to Posting and Best Practices