23 questions
1
vote
0
answers
83
views
Nest Objects to be be nested one more level further in Dapper .NET API
I have completely working code, which returns the desired result.
var query = @$"SELECT
boats.*,
gallery.*,
textblock.*,
engine.*,
generator.*,
media.*
FROM {...
4
votes
2
answers
195
views
Dapper - Lists of nested objects getting repeated values
I require to have a single API Endpoint, which will fetch records from these four tables in a single JSON file. I am using an ASP.NET Core 8 Web API. Inside QueryAsync, I tried different combinations, ...
0
votes
1
answer
55
views
SQL: Joining results of two individual joins
This is an IIT question
I am trying to solve this problem. And I can individually do
(i)P LEFT JOIN Q ON P.A = Q.A AND P.B = Q.B
and
(ii) Q RIGHT JOIN R ON Q.A = R.A
But to JOIN the results of these ...
-1
votes
1
answer
46
views
PHP, MySQL and multijoin query results. Is there any simple way to "convert" the results into hierarchIcal structure?
Let's say I have such query results. Originally they are absolutely flat rows (like MySQL query results always are) - I just managed to return them so that the current "main record" is ...
1
vote
3
answers
220
views
How to rename mutliples columns names (with prefix) according to respective dataframe name [R]
I have 15 dataframes, that I have merged together.
Here I'm loading my files.
data_files <- list.files() # Identify file names
for(i in 1:length(data_files)) { ...
-1
votes
1
answer
114
views
Multiple Full join is not working in PostgreSQL
I have one select statement with multiple full joins in it.
select
aroll as aroll,
aname as aname,
astandard as astandard,
amarks as amarks,
adepartment_id as adepartment_id,
broll as broll,
bname as ...
0
votes
2
answers
227
views
Auto populate data of primary keys of different tables into another one table as foreign keys using JPA/Hibernate
Below is the expected table structure:
Users -> user_id (PK)
RoleA -> role_a_id (PK)
RoleB -> role_b_id (PK)
User_Roles -> user_id (FK), role_a_id (FK), role_a_id (FK)
Below are the ...
-1
votes
2
answers
83
views
SQLSTATE[42000]: Syntax error or access violation: 1064- joins whit different tables
I´m trying to code this with laravel:
$software = $row['DisplayName0'];
$equipo = $row['Netbios_Name0'];
//echo $software ."</br>";
$sqlconsulta2= "select DISTINCT NOMSOF, TIPLICSOF, TIPIMASOF, ...
0
votes
1
answer
2k
views
Join/Merge Multiple Table with same column name
I want to join three tables respectively from the below SQLFiddle
http://sqlfiddle.com/#!9/5dd558/4
Now I want to create one table from this table based on date and Brand.
Like, I want data in this ...
0
votes
1
answer
183
views
mysql Fallback to another record if first not exist
I have two tables for creatives and its thumbnails. I want to query in a fallback way like:
Initially, the thumbnail will be displayed for 300x250
IF not available then 336x280,
IF not available ...
0
votes
2
answers
133
views
How to get previous N rows for multiple joining rows
I am writing a SQL with Oracle Client 12 driver. I have two tables simplified as appended, and I want to get a table with following logic. The "B.TIME_B <= A0.TIME_A" seems created massive joining ...
-1
votes
1
answer
53
views
Joining Multiple Tables With Left Join/ Outer Join
Hi I'm having trouble understanding join with multiple tables. I'm trying to get all data for each tables (Schedule,Forecast,Ideal,Actual). The query below would omit data from vendor..ideal_labor if ...
0
votes
1
answer
3k
views
Problem with jpa criteriabuilder multiple joins
I have a table with 2 foreign keys. I need to create a query that aggregates results that use both foreign keys.
i.e. Table A "b_id" is a foreign key to Table B "id",
Table A "c_id" is a foreign key ...
-1
votes
1
answer
193
views
SQL Query getting multple results from 3 table inner join
I am running an sql query (using microsoft report builder)joining three tables and getting duplicates, i cant seem to stop this.
i have one table (tableA) that holds the relevant fields ownerID, ...
-1
votes
1
answer
177
views
Multiple joins into the same table (TSQL) [duplicate]
I'm needing rows from the Employee table that have null values in OwnerID field and GMID field.
SELECT b.FirstName + space(1) + b.LastName AS OwnerName,
c.FirstName + space(1) + c....
0
votes
2
answers
63
views
MYSQL one big left outer join or 3 left outer joins same tables?
I'm not sure how to join two tables onto my main query. The two tables that determine the accountnumber join to each of the 3 main tables for different situations.
I'm trying to determine the ...
0
votes
1
answer
2k
views
MySQL VIEW with morph type in where statement
I have the following tables:
Apps
id name
1 a
2 b
3 c
Parts
id name app_id
1 x 1
2 x 2
3 y 2
4 z 1
5 z 2
6 z 3
Settings
id name ...
1
vote
2
answers
2k
views
MULTIPLE JOIN IN MS ACCESS
SELECT VISA41717.Fraud_Post_Date,
VISA41717.Merchant_Name_Raw,
VISA41717.Merchant_City,
VISA41717.Merchant_Country,
VISA41717.Merchant_Category_Code,
VISA41717.ARN,
...
0
votes
0
answers
453
views
Multiple select with same table join Vs Single cte table join with multiple select - Performance T-SQL
There are 3 tables that I need to Join with different filters.
EG:
Select 'First' as Header, *
from A join B on A.ID=B.ID
where A.Type=1 and B.Startdate>Getdate()
Union
Select 'Second' as ...
0
votes
1
answer
33
views
Multiple rows join
Please help me with next problem.
I have next table:
| Name | Size | DateTime |
|--------|--------|--------------|
| Adi | 120 | 2017-01-26 |
|--------|--------|--------------|
| ...
0
votes
1
answer
2k
views
Left join on 3 tables?
I have to use LEFT JOIN on 3 tables: UNITS, ROOMS_CHECK_IN and COMMENTS. Basically I want to show UNITS and for each unit count of rooms check in and count of comment. But I am getting same 4 digit ...
2
votes
3
answers
1k
views
Multiple join on same table
My Schema is
CREATE TABLE IF NOT EXISTS `account` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(120) NOT NULL,
PRIMARY KEY (`id`)
);
CREATE TABLE IF NOT EXISTS `reseller_did` (
`...
0
votes
1
answer
2k
views
How to prevent SQL multiple-join-rows error and apply values for multiple rows?
ERROR [HY000] ERROR: Update canceled: attempt to update a target row
with values from multiple join rows
Is there a way to avoid this error and update each row that contains E, despite having ...