tagged [join]

Join one row to multiple rows in another table

Join one row to multiple rows in another table I have a table to entities (lets call them people) and properties (one person can have an arbitrary number of properties). Ex: ## People ## Properties ``...

23 May at 19:11

How to execute my SQL query in CodeIgniter

How to execute my SQL query in CodeIgniter I have a problem with my query and now my problem is how can I execute my query. I got my syntax format from here [http://www.x-developer.com/php-scripts/sq...

MySQL LEFT JOIN Multiple Conditions

MySQL LEFT JOIN Multiple Conditions I have two tables: A and B linked by "group_id". 2 variables I'm using: `$keyword, $_SESSION['user_id']` group_id keyword id group_id user_id I want to be able to s...

7 May at 08:51

Combine multiple results in a subquery into a single comma-separated value

Combine multiple results in a subquery into a single comma-separated value I've got two tables: The relationship is one row of `TableA` - many of `TableB`. Now, I want to see a result like this: ``` I...

15 Mar at 08:11

How to perform Join between multiple tables in LINQ lambda

How to perform Join between multiple tables in LINQ lambda I am trying to perform a in LINQ. I have the following classes: And I use the following code (where `product`, `category` and `productcategor...

15 Mar at 13:0

Inner Join with derived table using sub query

Inner Join with derived table using sub query Environment: I created a derived table using sub query and joined with main table. I just like to know if subquery is executed only once or will it be exe...

SQL Update from One Table to Another Based on a ID Match

SQL Update from One Table to Another Based on a ID Match I have a database with `account numbers` and `card numbers`. I match these to a file to `update` any card numbers to the account number so that...

23 May at 16:50

How do you left join in Linq if there is more than one field in the join?

How do you left join in Linq if there is more than one field in the join? I asked a question earlier about [why left joins in Linq can't use defined relationships](https://stackoverflow.com/questions/...

23 May at 12:1

LINQ to SQL: Multiple joins ON multiple Columns. Is this possible?

LINQ to SQL: Multiple joins ON multiple Columns. Is this possible? A table named `TABLE_1` with the following columns: - `ID`- `ColumnA`- `ColumnB`- `ColumnC` I have SQL query where `TABLE_1` joins on...

How can I join multiple SQL tables using the IDs?

How can I join multiple SQL tables using the IDs? I have 4 different tables that I want to join. The tables are structured with columns as follows: Starting with Table A, I understand how to JOIN tabl...

14 Apr at 20:25

Is there some sort of syntax error with this LINQ JOIN?

Is there some sort of syntax error with this LINQ JOIN? I've looked at [various questions](https://stackoverflow.com/questions/3217669/how-to-do-a-join-in-linq-to-sql-with-method-syntax) on SO and [ot...

23 May at 12:25

LINQ join two DataTables

LINQ join two DataTables Hi I have a problem joining two DataTables using LINQ. Tables have columns like this: I used linq to join like this: ``` DataTable dtResult = new DataTable(); dtResult.Columns...

22 Jan at 10:14

Merging dataframes on index with pandas

Merging dataframes on index with pandas I have two dataframes and each one has two index columns. I would like to merge them. For example, the first dataframe is the following: The second dataframe is...

15 Feb at 06:40

using where and inner join in mysql

using where and inner join in mysql I have three tables. Here the table locations contains al

8 Sep at 07:33

How do I just LINQ Join() to link two IQueryables?

How do I just LINQ Join() to link two IQueryables? I have two IQueryables: I already have an IQueryable for Ingredient: How can I add a join to his so it filters by `AvailableIngredient` (i.e. an Inne...

Can't get c# linq query to compile with joins

Can't get c# linq query to compile with joins Below is a cut down example of some c# code I can't get to compile while doing some linq joins. Does anyone know why this doesn't compile? The error is > ...

30 Mar at 15:34

LINQ Join with Multiple Conditions in On Clause

LINQ Join with Multiple Conditions in On Clause I'm trying to implement a query in LINQ that uses a left outer join with multiple conditions in the ON clause. I'll use the example of the following two...

27 Jan at 10:2

Join between in memory collection and EntityFramework

Join between in memory collection and EntityFramework Is there any mechanism for doing a JOIN between an in-memory collection and entity framework while preserving the order. What I am trying is which...

ServiceStack Ormlite - Joins on child classes

ServiceStack Ormlite - Joins on child classes I'm using the latest ServiceStack Ormlite (v4.0.23), which provides new join support for joining on multiple columns. My entities all inherit from a BaseE...

The type of one of the expressions in the join clause is incorrect in Entity Framework

The type of one of the expressions in the join clause is incorrect in Entity Framework While trying to execute this query: ``` var query = from dpr in ctx.DPR_MM join q in ctx.QOT on dpr.DPR_QOT...

What's the best way to join on the same table twice?

What's the best way to join on the same table twice? This is a little complicated, but I have 2 tables. Let's say the structure is something like this: The tables can be joined based on Table1.PhoneNu...

24 Nov at 15:11

How to do join on multiple criteria, returning all combinations of both criteria?

How to do join on multiple criteria, returning all combinations of both criteria? I am willing to bet that this is a really simple answer as I am a noob to SQL. Given: - - There can be anywhere from 1...

2 Nov at 00:46

Pandas Merging 101

Pandas Merging 101 - `INNER``LEFT``RIGHT``FULL``OUTER``JOIN`- - - - - - `merge``join``concat``update` ... and more. I've seen these recurring questions asking about various facets of the pandas merge ...

31 Jul at 17:38

LINQ to SQL - Left Outer Join with multiple join conditions

LINQ to SQL - Left Outer Join with multiple join conditions I have the following SQL, which I am trying to translate to LINQ: I have seen the typical implementation of the left outer join (ie. `into x...

17 Sep at 15:10

MySQL: How do I join same table multiple times?

MySQL: How do I join same table multiple times? I have two tables `ticket` and `attr`. Table `ticket` has `ticked_id` field and several other fields. Table `attr` has 3 fields: `attr_type` is a fixed ...

24 Sep at 08:56