Questions tagged as 'join'

2
answers

I need to relate two tables in order to bring me a result within the conditions I want

I'm using SQLSERVER Condition (What the result should return me) · Creation of the agenda. It is necessary to create the flow for creation of agenda and blocking to reserve the vacancies; When crossing data from two tables I need to alloca...
asked by 13.05.2018 / 02:28
1
answer

How to use inner join in Laravel 5?

I have the following loop in a view table @foreach ($filme as $f) <tr> <td>{{ $f->fil_id }}</td> <td>{{ $f->fil_filme }}</td> <td>{{ $f->fil_sinopse }}</td>...
asked by 11.12.2017 / 03:20
2
answers

Join returning many records

Hello, I have already researched this error and I did not see any that fit my problem, so my problem is that I have two tables, I need to get some information from table B and insert it into the query next to table A, such as in table A I have i...
asked by 29.09.2017 / 14:20
1
answer

INNER JOIN WITH WHERE MYSQL

I have a foreach that runs each product, then I would like to do a query on two tables from that ID, but I'm not getting it, what am I doing wrong? $collection = Mage::getModel('catalog/product')->getCollection(); foreach ($collection as $k...
asked by 23.11.2017 / 17:56
1
answer

How to return pilot names in SQL table?

I have the following tables below, and would like to return only the name of the riders who have never participated in a race in a Brazilian circuit in the country brasil . Table Structure: PAIS (id, sigla, nome) EQUIPE (id, nome, pa...
asked by 14.07.2017 / 16:22
2
answers

Problem when performing join on tables with generalization

I'm having trouble performing a JOIN on tables so the problem is this: In a bulletin board system, I have users, including students, school officials, and school employees. I need to generate an SQL statement that, when informing the CPF of t...
asked by 23.12.2016 / 03:33
1
answer

Using Inner Join Correctly and Adding Results

In my DB, I have 4 tables: Aluno , Ano , Matérias and Nota . They are mounted as follows: Tabela :: Colunas ---------------------------------------------------------- Aluno :: AlunoID | AlunoNome | AnoID...
asked by 04.09.2016 / 04:02
1
answer

Select in three tables in a list - MYSQL

I have three tables: ESCRITORIOS id nome ESCRITORIOS_SEGMENTO id_escritorio id_segmento SEGMENTOS id nome_segmento What I need is to give a SELECT to list this information as well SEGMENT BLABLA: desk 1, desktop 2 BLIBLI SEGME...
asked by 22.02.2016 / 17:57
1
answer

createQuery (HQL) returns NullPointerException when trying to perform LEFT OUTER JOIN

Personal speech, I'm having a problem trying to run an HQL in my application. HQL is basically this: select c.id, c.solicitante from <mypackage>.Exame c LEFT OUTER JOIN <mypackage>.Profissional prof Java code: hql = "sel...
asked by 25.02.2016 / 19:38
2
answers

Inner join join table with several equal IDs

The problem is as follows, I have two tables one of contracts and one of borrowers 1xN and when I do inner join it repeats exactly the amount of columns that I have in borrower but only brings the name of the first one. follows an example...
asked by 14.10.2015 / 21:32