tagged [join]
JPA Criteria API - How to add JOIN clause (as general sentence as possible)
JPA Criteria API - How to add JOIN clause (as general sentence as possible) I am trying to construct queries dynamically, and my next target is add JOIN clauses (I don't know how can I use the API). B...
- Modified
- 9 Oct at 16:46
MySQL complex query not yielding proper results
MySQL complex query not yielding proper results I have two table: Vehicles(Id, VIN) and Images(Id, VehicleId, Name, Default). I need to select the vehicles VIN and its default picture to display in a ...
Why is this Cross Join so Slow in Linq?
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 t...
- Modified
- 14 Mar at 13:13
Entity Framework include with left join is this possible?
Entity Framework include with left join is this possible? I have the following tables 1. ClassRoom (ClassID,ClassName) 2. StudentClass (StudentID,ClassID) 3. Student (StudentID,StudentName,Etc..) 4. S...
- Modified
- 27 Aug at 20:40
SQL Four Tables One Recordset
SQL Four Tables One Recordset What am I missing? I need to return all records that match the Last_Name Query whether they do or do not have a Customer Number in the Field_Table. I am calling the Clien...
LINQ Inner-Join vs Left-Join
LINQ Inner-Join vs Left-Join Using extension syntax I'm trying to create a left-join using LINQ on two lists that I have. The following is from the Microsoft help but I've modified it to show that the...
How to do joins in LINQ on multiple fields in single join
How to do joins in LINQ on multiple fields in single join I need to do a LINQ2DataSet query that does a join on more than one field (as I have yet found a suitable solution (I can add the extra constr...
Nice, clean cross join in Linq using only extension methods
Nice, clean cross join in Linq using only extension methods > [Nested “from” LINQ query expressed with extension methods](https://stackoverflow.com/questions/9115675/nested-from-linq-query-expressed-...
- Modified
- 23 May at 12:2
How to use join with multiple conditions in linq-to-Nhibernate
How to use join with multiple conditions in linq-to-Nhibernate I have two classes (Request & RequestDetail). I need to a `Linq To NHibernate`query between two classes by join. ``` var q = SessionInsta...
- Modified
- 15 Nov at 09:39
how do you search Right/Left joins?
how do you search Right/Left joins? I am having a problem searching multiple tables ,i have 2 tables tblcourse -courseid -name -status tblenroll -courseid(holds courseid from tblcourse) -studentid let...
SQL Left Join first match only
SQL Left Join first match only I have a query against a large number of big tables (rows and columns) with a number of joins, however one of tables has some duplicate rows of data causing issues for m...
- Modified
- 12 Oct at 02:2
query specified join fetching, but the owner of the fetched association was not present in the select list
query specified join fetching, but the owner of the fetched association was not present in the select list I'm selecting two id columns but get error specified: ``` org.hibernate.QueryException: **que...
Combine two pandas Data Frames (join on a common column)
Combine two pandas Data Frames (join on a common column) I have 2 dataframes: restaurant_ids_dataframe ``` Data columns (total 13 columns): business_id 4503 non-null values categories 4503 non-nu...
Include with FromSqlRaw and stored procedure in EF Core 3.1
Include with FromSqlRaw and stored procedure in EF Core 3.1 So here's the deal - I am currently using EF Core 3.1 and let's say I have an entity: When I access the `DbSet Entities` normal way, I inclu...
- Modified
- 17 Dec at 20:18
lambda expression join multiple tables with select and where clause
lambda expression join multiple tables with select and where clause I have three table many to many relationship I have joined the three table and select the value I want but now I need to select one ...
- Modified
- 17 Nov at 06:29
Create combined DataTable from two DataTables joined with LINQ. C#
Create combined DataTable from two DataTables joined with LINQ. C# I have the following code that fills `dataTable1` and `dataTable2` with two simple SQL queries, `dataTableSqlJoined` is filled from t...
How to LeftJoin to the same table twice using ServiceStack OrmLite?
How to LeftJoin to the same table twice using ServiceStack OrmLite? I have table structures that look like below: I want to use OrmLite to generate SQL simil
- Modified
- 27 Jan at 14:4
SQL select join: is it possible to prefix all columns as 'prefix.*'?
SQL select join: is it possible to prefix all columns as 'prefix.*'? I'm wondering if this is possible in SQL. Say you have two tables A and B, and you do a select on table A and join on table B: If t...
JPA eager fetch does not join
JPA eager fetch does not join What exactly does JPA's fetch strategy control? I can't detect any difference between eager and lazy. In both cases JPA/Hibernate does not automatically join many-to-one ...
SQL Server: Multiple table joins with a WHERE clause
SQL Server: Multiple table joins with a WHERE clause I'm using SQL Server and I'm having a difficult time trying to get the results from a `SELECT` query that I want. I've tried joining in different o...
- Modified
- 5 Nov at 22:9
Left Join without duplicate rows from left table
Left Join without duplicate rows from left table Please look at the following query: ``` Content_Id Content_Title Content_Text 10002 New case Study New case Study 10003 New case Study New case St...
- Modified
- 31 Mar at 18:58
How to Left Outer Join two DataTables in c#?
How to Left Outer Join two DataTables in c#? How can I Left Outer Join two data tables with the following tables and conditions while keeping all columns from both tables? dtblLeft: dtblRight: ``` col...
Getting inappropriate output with left join
Getting inappropriate output with left join I am trying to get list of variants and for each of this variants get all `subvariants list` irrespective of where subvariants fall for particular `Test say...
- Modified
- 1 Aug at 18:57
Does "where" position in LINQ query matter when joining in-memory?
Does "where" position in LINQ query matter when joining in-memory? Say we are executing a LINQ query that joins two in-memory lists (so no DbSets or SQL-query generation involved) and this query also ...
- Modified
- 18 Dec at 12:8