Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2007
    Posts
    29

    Unanswered: oracle sql join issues

    Hi all,
    I want to perform a join between two tables based on a column that its not equal in the two tables. The Tables join columns has values like:

    Table 1 Column values Table 2 Column values
    1 1-5
    2 6-10
    3 11-15
    5 16-20
    7 21-25
    8 26-30
    9 31-35
    10 36-40
    13 41-50
    19 51-60
    21
    26
    30
    35
    43
    49
    57

    The two columns have varchar2 as the datatype in the oracle 10g environment I'm working with. I would like to join them to pull out rows where Table 1 column values is in the range of table 2 column values.
    Thanks a lot
    'soga

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    HUH?
    While you may understand your question, I do not.
    Please use <code tags>
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Nov 2007
    Posts
    29

    Join issues

    Oops!
    I just saw that the browser jagged them together making the lines distorted. So i can guess why you did not understand the question but in any case thanks to everybody and you too for your prompt response, I have actually solved the join condition. use between and substr
    Cheers
    'Soga

  4. #4
    Join Date
    Sep 2003
    Location
    The extremely Royal borough of Kensington, London
    Posts
    778
    So in other words, you just want to do a Cartesian join on two sets that just happen to be the same. You can use the CROSS JOIN keyword to ease in understanding the intent of the query.

    Regards,
    Bessie Braddock: Winston, you are drunk!
    Churchill: And Madam, you are ugly. And tomorrow, I'll be sober, and you will still be ugly.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •