Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6585911
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T16:43:26+00:00 2026-05-25T16:43:26+00:00

I have the following issue. We have two tables that look like that :

  • 0

I have the following issue. We have two tables that look like that :

[t1]
Ruler   ID1 S1  E1
**1     a   1   10**
1       b   17  24
1       c   20  24
1       d   21  24
*2      e   40  47*    

[t2]
Ruler   ID2 S2  E2
**1     a   7   15**
**1     b   8   16**
2       c   25  35
*2      d   41  50*

[t3]
Ruler   ID1 S1  E1  ID2  S2  E2  
**1     a    1  10    a   7  15
1       a    1  10    b   8  16**
*2      e   40   7    d  41  50*
  • We have about 20 scales (here I just show scale 1 and 2)
  • S1 (S2) AND E1(E2) Represent respectively start and end position on a scale
  • L1(L2) is the length of each segment. Segment from t1 can overlap
  • segments from t2 and vice-versa Multiple segments can overlap each
    other

To select segments that overlap each other I need to do a CROSS JOIN of t1 and t2 and find what segment from t2 overlap those in t1 and then insert those into t3.

If I do table UPDATE that returns 0 match rows

UPDATE t3 CROSS JOIN (t1, t2) ON 
  ((t2.S2 BETWEEN t1.S1 AND t1.E1) OR (t2.E2 BETWEEN t1.S1 AND t1.E1))
SET t3.CHR1 = t1.CHR1, t3.ID1 = t1.ID1, t3.S1 = t1.S1, t3.E1 = t1.E1, t3.ID2 =
t2.ID2, t3.S2 = t2.S2, t3.E2 = t2.E2
WHERE t1.CHR1 = t2.CHR2;

If I do INSERT INTO t3 ( or a INNER JOIN) that doesn’t replace a CROSS JOIN. …So I don’t know what to do from here..

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T16:43:27+00:00Added an answer on May 25, 2026 at 4:43 pm

    I Believe your query syntax is wrong.

    update command syntax was
    update <table> set x=(select query),... where ...

    And more over here it looks like you are joining T3 in the process and trying to update the temp table (t3 CROSS JOIN (t1, t2)) created in the join command.

    Please check the syntax of cross join also.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Just to expand on my previous issue - I have two tables in my
I have the following code that will join two different tables together and provide
I have the following issue: A java object contains two arrays of core datastore
I have the following issue and I would like to know what exactly happens.
I have the following issue: I have a splash like window coming with my
I'm just starting with Object Oriented PHP and I have the following issue: I
I have a view that returns data like the following: 1 | Abita |
I'm wondering if anyone has faced this issue. Let's assume I have two tables:
I have two tables, as per following example, in an MSSQL db. PROJECT id
I have two tables with the following columns: Table1 { ID NUMBER(15), ROLL_NUM VARCHAR2(9),

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.