I am looking for a way, using Boost Polygon, to read in a large set of polygons from a file, and output the resulting merge or union to a result file. In this case the polygons touch but do not overlap. I can put the data in any format. Not sure if there is a standard used by Boost Polygon. I am also looking for more documentation on the...
from my question
http://stackoverflow.com/questions/3601472/insert-element-to-arraylist-with-ascending-order-and-no-duplicate-elements
i've done my insert method.
Now i try to find out union, intersect, and difference method to operate 2 IntSet.
Notice that number elements of IntSet is large and i need to do it in O(m+n) time where ...
I have these four tables described bellow. Basically I have feeds with entries relationed with categories, and each category can be a main category or not (flag named as "principal").
Also each feed can be a partner feed or not (flag named as "parceiro").
I want to select all feed entries from partrners feeds, so I have this:
SELECT `e...
I have this strange error in SQL Server 2005 where I take a working query, add the UNION keyword below it and then copy the query again. In my opinion, this should always be working, but it is not. I get the message 'Incorrect syntax near the keyword 'union'.
What could create this problem ?
To be more specific, here is the complete q...
For examples I don't know how many rows in each table are and I try to do like this:
SELECT * FROM members
UNION
SELECT * FROM inventory
What can I put to the second SELECT instead of * to remove this error without adding NULL's?
...
I have to run a select statement across several tables. I am sure the tables return different records. I am anyway using UNION ALL.
Is it better to use UNION or of UNION ALL in performance terms when I am sure the tables return different records?
...
I have the below SQL Query
select Count(emailID) as ViewsThatMonth,
Day(entry_date) as day,
Month(entry_date) as month,
Year(entry_date) as year
from email_views
where emailID = 110197
Group By Day(entry_date), Month(entry_date), Year(entry_date)
UNION ALL
select Count(emailID) as ViewsThatMon...
union a
{
int x;
char a[2];
}
If we assign 512 value to x and try to print a[0] and a[1] then what will be the output
please explain how?
...
I have following classes: Classes B, C and D are the subclasses of A.
A ----+----------> B
|
+----------> C
|
+----------> D
Besides, I have an object property, hasObjectProperty, and some other classes X, Y, Z,
where X, Y, Z are disjoint classes.
Then I set restrictions to classes B, C and D as following:
(He...
What is the proper way to exclude results from a MySQL UNION? I'm looking for the equivalent to:
(query1)
UNION
(query2)
UNION
(query3)
EXCEPT
(query4)
...
i have two queries being combined with a UNION ALL1:
--Query 1
SELECT Flavor, Color
FROM Friends
--Query 2
SELECT Flavor,
(SELECT TOP 1 Color
FROM Rainbows
WHERE Rainbows.StrangerID = Strangers.StrangerID
ORDER BY Wavelength DESC
) AS Color
FROM Strangers
Both of which, of course, work fine separately, but ...
Lets say there are two (non disjoint) sets of points (cartesian space), what is the best case complexity algorithm to perform the union of the two sets ?
...
I was testing out a query to get a random integer in MySQL, and I noticed this behavior:
mysql> SELECT FLOOR(0 + (RAND() * 5)) UNION SELECT FLOOR(0 + (RAND() * 5)) UNION SELECT FLOOR(0 + (RAND() * 5));
+-------------------------+
| FLOOR(0 + (RAND() * 5)) |
+-------------------------+
| 1 |
| ...
$queryActivities = mysql_query("
SELECT ua.status, ua.date, 'status' AS is_table FROM users_statuslog ua
WHERE ua.uid = '{$showU[id]}'
UNION ALL
SELECT us.message, us.date 'wall' FROM users_wall us
WHERE us.uid = '{$showU[id]}'
ORDER BY `date` DESC");
This is what I have right now. And I need some more columns from users_wall, ...
Before delving into the issue, first I will explain the situation. I have two tables such as the following:
USERS TABLE
user_id
username
firstName
lastName
GROUPS TABLE
user_id
group_id
I want to retrieve all users who's first name is LIKE '%foo%' and who is a part of a group with group_id = 'givengid'
So, the query would like somet...
Is there a way to retrieve all the data from an IN clause?
Let's assume my table got (ID,Name):
0 Banana
1 Mango
2 Papaya
3 Lemon
and my query:
SELECT * FROM Fruits WHERE Name IN (Banana,Mango,Orange)
I Want 'Orange' to return, with an empty ID (since there's no register). How to do this?
...
I'm trying to figure out some C code so that I can port it into python. The code is for reading a proprietary binary data file format. It has been straightforward thus far -- it's mainly been structs and I have been using the struct library to ask for particular ctypes from the file. However, I just came up on this bit of code and I'm at...
In C, is it possible to define a union within another union? If no, why is it not possible? Or if yes, where can it be used?
...
I have the following database schema (names changed to protect the innocent)
Code Table
| code_id | code_desc |
|---------|-----------|
| 1 | good |
|---------|-----------|
| 2 | bad |
|---------|-----------|
| 3 | ugly |
|---------|-----------|
Foo Table AssignedFoo Tabl...
Hi,
Im having two tables with attributes like date(datetime),headline(varchar),text(text)
Now i want to UNION ALL these two tables and sort by the datetime. When doing this i'm getting the error:
Only text pointers are allowed in work tables, never text, ntext, or image columns. The query processor produced a query plan that requir...