Join two tables

  • Hello everyone.

    I hope you are fine and i would like you can help me.

    I want to join to tables.

    Table A one column (numbers)

    Numbers

    --------------

    12345

    12346

    12347

    --------------

    Table B one column (serial)

    Serial

    --------------

    ABC-2015

    ABC-2016

    ABC-2017

    ABC-2018

    --------------

    I would like to get a result like:

    Numbers Serial

    12345 ABC-2015

    12345 ABC-2016

    12345 ABC-2017

    12345 ABC-2018

    12346 ABC-2015

    12346 ABC-2016

    12346 ABC-2017

    12346 ABC-2018

    12347 ABC-2015

    12347 ABC-2016

    12347 ABC-2017

    12347 ABC-2018

    In table A I can have thousands of rows and table B 50 rows.

    Thans for everything.

    Regards.

  • It's a full Cartesian Product. There's no join criteria.

    select A.Numbers , B.Serial

    fromTableAA,

    TableBB

    or

    select A.Numbers , B.Serial

    fromTableAA

    cross joinTableBB

    (Edited to tighten up formatting)

  • Great... it is working fine.

    thanks for all.

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

You must be logged in to reply to this topic. Login to reply