The cross-join tag has no wiki summary.
0
votes
0answers
15 views
Add blank columns in MDX query
How to add blank columns in MDX Query?
I have tried all possible options such as adding member and all, but when I am trying to cross join the new member, i get MDX errors. Please guide me through ...
1
vote
2answers
104 views
Oracle Cross join
I've got these three tables.
Table1:
Resource1
Resource2
Resource3
Table2:
Period1
Period2
Period3
Table3:
Resource1 Period1
Resource1 Period2
Resource1 Period2
Resource2 Period1
Resource2 ...
1
vote
1answer
134 views
Using LINQ in cross-join query of a datatable in C#
I have an issue with using LINQ for cross-join query of a dataTable.
DataTable dt_edges = new DataTable();
dt_edges.Columns.Add("EdgeID", typeof(string));
dt_edges.Columns.Add("TriangleID", ...
0
votes
2answers
35 views
sql script for special data representation
Please help me with my problem of data representation.
I have some SQL script, that creates the following data presentation:
Declare params cursor for
Select distinct id_variable from ...
-3
votes
1answer
60 views
How to use inner join and cross join in one query?
I have a task to write a query that uses a single inner join and cross join(s). The query I have already written that should return the same result looks like this :
SELECT T.PRICE, S.ROW, S.NUMBER, ...
1
vote
1answer
66 views
Cross Join Split of Data
I have a table Employee, another table Department and a relational table:
Employee Table
id Name
1 A
2 B
3 C
4 D
5 E
6 F
Department Table
id Name
1 Accounting
2 Finance
Relation ...
0
votes
3answers
34 views
Combine 2 tables to join to
I'm using Postgres 9.1 and I have a query which returns 2 columns which I would like replicated even if no data is present. The important parts of my query are
SELECT DATE_TRUNC('week', tx_dttm) AS ...
1
vote
3answers
130 views
PostgreSQL LEFT OUTER JOIN query syntax
Lets say I have a table1:
id name
-------------
1 "one"
2 "two"
3 "three"
And a table2 with a foreign key to the first:
id tbl1_fk option value
...
0
votes
1answer
71 views
How to group a set of row from a table by every possible combination of 3 other tables?
Here are the table structures
Table A (id, name)
Table B (id, A-id)
Table C (id, quantity, B-id, D-id)
Table D (id, E-id, F-id)
Table E (id, name)
Table F (id, name)
I want to get the result like ...
12
votes
2answers
235 views
Why is this Cross Join so Slow in Linq?
I wrote this piece of Linq to handle doing a CROSS Join just like a database would between multiple lists.
But for some reason it's extremely slow when any of the lists go more than 3000. I'd wait ...
0
votes
1answer
140 views
Hibernate generates cross join instead of left join
I'm using hibernate 3.6.10.Final and MySQL 5.5.
I wrote a dynamic query like this:
"from " + clazz.getName()+ " ORDER BY "+sortField+" "+sortDirection
My hibernate entities have a many to one ...
1
vote
1answer
164 views
Aggregate functions on multiple joined tables
I have three tables:
CREATE TABLE foo (
id bigint PRIMARY KEY,
name text NOT NULL
);
CREATE TABLE foo_bar (
id bigint PRIMARY KEY,
foo_id bigint NOT NULL
);
CREATE TABLE tag (
...
2
votes
2answers
86 views
Self cross-join in pig is disregarded
If one have data like those:
A = LOAD 'data' AS (a1:int,a2:int,a3:int);
DUMP A;
(1,2,3)
(4,2,1)
And then a cross-join is done on A, A:
B = CROSS A, A;
DUMP B;
(1,2,3)
(4,2,1)
Why is second A ...
0
votes
2answers
84 views
MDX: Crossjoin and set evaluation
I'm struggling with this MDX that on rows should return crossjoin of Date and Countries sorted by value. Apparently, "[Date].[Fiscal Year].CurrentMember" in Order function during crossjoin is still ...
1
vote
3answers
59 views
unknown column in on clause error
Hey guys I am this close in being able to represent the data that I wish to display
The column in question is a.state_Id.
I understand from the research I have done that the a.State_Id is out of ...
0
votes
2answers
122 views
Create new table from average of multiple columns in multiple tables
I have the following query:
CREATE TABLE Professor_Average
SELECT Instructor, SUM( + instreffective_avg + howmuchlearned_avg + instrrespect_avg)/5
FROM instreffective_average, ...
2
votes
1answer
117 views
Entity framework: cross join causes OutOfMemoryException
I've got a table with 1.5 million records on a SQL Server 2008. There's a varchar column 'ReferenzNummer' that is indexed.
The following query executed in the SQL Management Studio works and is ...
1
vote
1answer
293 views
Inner Join vs Cross Apply - Multi-part identifier could not be bound
Consider the following schema:
create table TableA (A1 int)
create table TableB (B1 int, B2 int)
create table TableC (C1 int, C2 int)
create table TableD (D1 int)
And the following query:
SELECT * ...
2
votes
1answer
353 views
T-SQL - Group by Date within Date Range with counts on two columns
I have a issue tracking database. I need to be able to provide a report of all the issues opened and closed for each day within a date range.
I've been able to produce results for one column at a ...
1
vote
1answer
389 views
Cross join multiple measure groups in MDX
I have two dimensions, and one measure group: [Time].[Day], [Scenario].[Scenario] and the measures group containing two measures, [Measures].[CleanPrice] and [Measures].[DirtyPrice]
I start out with ...
0
votes
2answers
140 views
MDX adding together two cube measures across two role playing dimensions
I have two queries which I would like to join together,which would give me the calculated total of the row. The problem I have is that although the measures are from 1 fact table the Squad names are ...
0
votes
2answers
156 views
permutation and combination
i have a table with only one column consisiting of 5 colours-
colour
-------
red
black
white
green
orange
I want to get all the combinations like
(red,orange)
(black,white)
.
.
.
etc except the ...
0
votes
0answers
62 views
generate mdx from dice or selection operation
I'm currently working on a project which require me to map the dice operation to a MDX form. I found that dicing / do a selection on multiple dimension is something about combining the attribute value ...
1
vote
2answers
138 views
CROSS JOIN of query and single-row table
I have a big query and a table with a single row (I store some constants in it).
What is the best way to join the row of the table with every row of the query considering that Access doesn't support ...
1
vote
1answer
168 views
SQL Server subquery in cross join returns error
I have tables A, B and C. Now table A as column A1(Primary Key), table B has column B1(Primary Key) and table C has columns A1(Foreign Key to Table A.A1), B1(Foreign Key to Table B.B1).
Now I'm ...
1
vote
2answers
57 views
Need some advice on best way to write Large reporting query from a fairly complex source
After searching through other answers to see if this particular question has already been asked (and other flavours have been asked - just not covering off everything I need to enquire about), I would ...
2
votes
1answer
278 views
Cross join N sets of rows in same table
I have a generic "Dimension" and "DimensionMember" tables.
CREATE TABLE [dbo].[Dimension]
(
[ID] [int] NOT NULL IDENTITY(1, 1),
[Label] [nvarchar] (255)
)
CREATE TABLE ...
0
votes
0answers
183 views
Avoid cross join
I have three tables: Student, Question and Answer. Answer has FK to both Student and Question.
I used a cross join on students and questions:
Create PROCEDURE [dbo].[Fetch_AnswersForStudents]
...
0
votes
2answers
79 views
Cross Join with always the same string message
I am using Microsoft SQL Server 2005.
I would like to have a table in output with a column regarding duplicate values in cross join with a table containing only a column with the same string message.
...
1
vote
2answers
98 views
Preferred way to cross join a table with (0,1)^T?
I have a table T1, and I want to get a new table with twice the rows: An extra column which gets 0 (for one copy of T1) and 1 (for a second copy of T1).
In other words, I want to cross-join T1 with ...
0
votes
1answer
94 views
Is it possible to use CROSS JOIN + INNER and/or OUTER join on Access 2003? If so, how? Probably also needs subquery…?
I have a database with several tables: [Plan Revenue], [Plan Revenue Expense], [Support Provider], [Z Service Codes New]
I've already got a query written that will give me a count of how many expense ...
0
votes
2answers
353 views
Grouping in MDX Query
I am very newbie to MDX world..
I want to group the Columns based on only 3 rows. But, need join for 4th row also..
My query is :
SELECT
( {
[Measures].[Live Item Count]
}
) ...
1
vote
1answer
88 views
How to join tables to get one row for each row of source tables?
I have two different kinds of entities in two tables with only a few common columns that I want to join and sort by one of the common columns. In the resulting table each row should represent either a ...
1
vote
1answer
246 views
How to perform cross join on datatables
i am to perform cross join (many to many relation) on datatables ( table1 X table2 X table3 X n tables).
this can be done using for/foreach loop or linq.. but dont know which one should i go for or ...
0
votes
2answers
93 views
Choose minumum result of SELECT query in Postgresql
I have the following query where I want to calculate the closest user to a building of type "store":
WITH y AS (
SELECT t.userid as us, ST_Distance(t.thegeometry,b.thegeomtry) as dist
FROM track ...
1
vote
1answer
647 views
MDX crossjoin with 5 dimensions
Assuming we have the following dimension
DATE
CONTRACTOR
COLOR
SIZE
and a set of 6 measures, we want to get the 6 measures for every Semestrer, Trimester, Month, Contractor, Color and Size for a ...
1
vote
3answers
501 views
How to do cross join in R?
How can I achieve a cross join in R ? I know that "merge" can do inner join, outer join. But I do not know how to achieve a cross join in R.
Thanks
0
votes
1answer
64 views
Handling different conditions present in table parameter to work as “AND” instead of “OR”
I have a page where user dynamically add search condition(s) to filter out records.
I am sending those conditions to stored proc in a TVP.
Now i need to write a query which applies those filters work ...
0
votes
3answers
299 views
MySql query - counting rows and percentages
I'm trying to make a list of students and and their efficiency with tests.
In MySql database I have next tables
users - table with students
id | name
_________
1 | Joe
2 | Marry
3 | Max
4 | Anna
...
0
votes
1answer
224 views
hibernate and Sybase error
I use hibernate and sybase in my project,the sql which generated by hibernate used cross join,but sybase do not support cross join,can anyone tell me how can I avoid cross join?
thanks
0
votes
1answer
122 views
mySql N to N double join with null - CROSS join from answer
I have two tables one called permissions and one called roles which are related through a third table called RolePermissions in a N-N relationship.
Permissions
id <- PK
name
Roles
id <- PK
...
0
votes
1answer
245 views
Crossjoin using QueryOver
How could I replace the HQL query below using QueryOver API?
var sql = "from Role r, Action a where r.Active = :active and a.Active = :active";
var result = ...
0
votes
0answers
151 views
Subquery at the from clause using QueryOver syntax
I have the following query
SELECT DISTINCT v.ActionID, v.ActionName, v.Category, v.RoleID, v.RoleName,
CASE WHEN ra.ID IS NOT NULL THEN 1 ELSE 0 END AS AccessRight
FROM
(SELECT ...
2
votes
2answers
387 views
Join table on itself without two queries
I've seen people recommending cross joining a table on itself by doing this:
SELECT *
FROM tbl AS A, tbl AS B
WHERE A.col1 = 1 AND B.col1 = 1
But here, the engine needs to iterate through all of ...
0
votes
3answers
33 views
Mysql duplecating results
I'm making a invoice script but my query is returning al my entries mulpiple times when i fetch them.
this is my code:
$query = " SELECT d.Quantity, d.ProductID, p.ProductName, ...
1
vote
3answers
415 views
SQL cross join on temp table slow results
Have added the following code to my SQL query: (Note cut down version)
DECLARE @rowType AS TABLE (
rowTypeLabel NVARCHAR (20));
INSERT INTO @rowType
VALUES ('Cumulative');
INSERT INTO ...
0
votes
2answers
89 views
MySQL select from table 2 same as table 1
I have two tables
"employers":
emp_id empl_name wage
1 john 20/h
2 mike 20/h
3 sam 30/h
"positions":
pos_id emp_id pos_name ...
0
votes
1answer
93 views
SQL - Query Select Joins through multiple tables
Here is the situation:
I search for Persons with ID (empr.empr_cb)
that has bill(s) to pay (transactions.montant)
this refers to transactions.compte_id
which is identical to comptes.id_compte
this ...
0
votes
2answers
308 views
CROSS JOIN filter
I need to 'manufacture' records for a query, but at the same time, restrict the list of values that are returned from a 'lookup' table.
Is there a way to use 'filter' a CROSS JOIN without having to ...
3
votes
4answers
2k views
Are Mondrian / OLAP the wrong tool for joining large dimensions/sets?
Summary: Most of the examples I've seen of MDX joins have involved joining relatively small sets, say with tens or hundreds of items each. But I find myself also wanting to try joining (in particular ...