Questions tagged [intersect]

The SQL intersect operator returns rows that are common between two tables without returning duplicate records.

643 questions
1
vote
2 answers

determining algorithm for calculating a point intersecting a circle where the segment crosses from inside to the outside of the circle

I have a line segment between points A and B. A is inside a circle with a center at 0,0 with a radius of R. I am stumped trying to come up with an efficient way to calculate the intersection of line segment AB with this circle.
Mudcrush
  • 11
  • 1
1
vote
1 answer

Oracle SQL intersect between select and simple collection

I would like to write an SQL script like this: select count(*) from table1 t1 where exists ( select t2.desired_col from table2 t2 where t1.ID = t2.reference_t1_id intersect (2, 5, 9, 10) ); The goal is to tell me, how many entries…
hildebro
  • 549
  • 2
  • 5
  • 20
1
vote
1 answer

We have 2 lines. How can we get point where that 2 lines intersect with JavaScript?

1st line A(x1, y1) is starting point and B(x2,y2) is end point 2st line A(x2,y2) is starting point and B(x2,y2) is end point I need a function which can return the point where these 2 lines will intersect.
1
vote
1 answer

Retrieving elements in common between two lists hierarchically organized

This is a variation of a question previously posted here. R - A loop comparing elements in common between two hierarchical lists I figured this problem might present sufficient alteration in its solution form, hence a new post. I would like to…
1
vote
3 answers

Substring comparer on Intersect

I need to do an intersect between strings but comparing substrings: public class MiNumeroEqualityComparer : IEqualityComparer { public bool Equals(string x, string y) => x.Contains(y); public int GetHashCode(string obj) =>…
Enrique
  • 126
  • 1
  • 8
1
vote
1 answer

Bounds intersection

Given a Bounds structure like this: struct Bounds { public double xMin; public double xMax; public double yMin; public double yMax; } I'm trying to find out how two Bounds A and B intersect. Possible results are: A and B do not intersect…
Nicolas Repiquet
  • 9,097
  • 2
  • 31
  • 53
1
vote
1 answer

Intersect method error when changing work sheet

Whenever a user is editing a cell and switching the sheet while editing, the following error message appears: Run-time error '1004': Method 'Intersect' of object '_Global' failed Here's the code: Private Sub Workbook_SheetChange(ByVal sh As Object,…
user3545063
  • 681
  • 8
  • 17
1
vote
1 answer

overlap(intersect) time interval and xts

There's two time datasets: data from raincollector -- time interval ti with start, end and rain p (total amount of rain per period in mm) ti <- data.frame( start = c("2017-06-05 19:30:00", "2017-06-06 12:00:00"), end =…
atsyplenkov
  • 1,158
  • 13
  • 25
1
vote
2 answers

Finding a dynamic intersection of a table

I have a query that will return some results like London 111 London 222 London 333 Manchester 333 Liverpool 111 Liverpool 222 Liverpool 333 Leeds 111 Leeds 222 Leeds 333 My stored procedure takes in a user…
1
vote
1 answer

vba excel choosing the right worksheet

The Problem is in the section "Intersect" nearly at the end of the code. It continuous running only when the new sheet is brought into the foreground. Moreover, is there a way to incooperate the command "Intersect" without the "with…
Crues
  • 165
  • 1
  • 2
  • 15
1
vote
1 answer

Intersect keeping the count from both queries for ordering purpose

I have two tables that I need to run query against each. The output of these two queries then need to be intersected and sorted based on the the number of occurrences of names found in both tables. For example: Query 1: select * from userA group by…
M.Ridha
  • 483
  • 1
  • 6
  • 21
1
vote
3 answers

PL/SQL Oracle. Best way to implement an IS_CONTAINED operator

I am newbie so that maybe this question has been made one or two million times, but it is not findable / searchable in the knowledge database. In Oracle PL/SQL, it is normal to query as follows: select a,b,c from table_foo where c in (select k…
comrlr
  • 11
  • 2
1
vote
3 answers

Compare two vectors of numbers based on threshold of tolerance (±) of 0.5

I have two vectors g and h. I want to compare the numbers in these two vectors and find out whether there are any common elements between them. But the common elements do not have to be exactly the same and can be within a range of (-0.5, +0.5).…
benett
  • 91
  • 8
1
vote
2 answers

Block a Ball at a curved intersection? [Java]

I want to have a curved shield in front of my space ship to block incoming attacks. Any ideas on how to use an image and make it only detect where the pixels are or something similar? Even if I have two objects, being the image and something else…
Zeveso
  • 1,274
  • 3
  • 21
  • 41
1
vote
2 answers

SQL Server intersect query

I have a database defined as follows: create table Classes ( Id INT not null, Text NVARCHAR(255) null, primary key (Id) ) create table Documents ( Id INT not null, Title NVARCHAR(MAX) null, Abstract NVARCHAR(MAX) null, Year INT…
cs0815
  • 16,751
  • 45
  • 136
  • 299