Questions tagged as 'join'

1
answer

Add different columns in the same result

I'm trying to generate a SELECT in PostgreSQL that pulls columns from different tables into the same column as the result. Home Example: Usuario ----------------------- | id | nome | regra | |---------------------| | 1| João | ADM | |-...
asked by 22.07.2016 / 18:13
1
answer

Champ Error inconnu dans on clause - SQL

I have the following situation with 3 tables: ocorrencias : It has 6 columns: tipo_falha_1 to tipo_falha_6 . It is a 2-digit code, from 1 to 20. tipo_falha : Has a description of the faults. The cod field is...
asked by 10.03.2016 / 12:39
1
answer

Combination of digits A to Z (Crosse Join)

I'm doing an algorithm that gives the combination in 4 digits from A to Z. I did using vectors in Pascal like this: var i:integer; j:integer; k:integer; l:integer; vect1:array[1..26] of string; vect2:array[1..26] of string;...
asked by 20.02.2016 / 21:45
1
answer

Compare all the records in table "A" with each record in Table "B"

I am a programmer and rarely use a database, I came across an unusual situation of converting multiple .DBF files and saving everything in the database in their respective tables, however some files surpassed more than 3 million records, as a pr...
asked by 26.10.2015 / 23:52
1
answer

Use Left Join on Datatable Server-Side

After several attempts, I have not yet been able to implement a 100% left join within the Datatable Server-Side Please note, the following code works 100% HTML <table id="datatable_fixed_column" class="table table-striped table-border...
asked by 16.11.2014 / 03:23
1
answer

INSERT WITH JOIN DUPLICATING DATA

Hello, I have these 3 tables in my database: Table colaboradores Table cursos Table c_vendas_itens I would like to do a join of the three tables and save to another one, I can do this through the query below, however every time I have a new...
asked by 02.01.2019 / 03:19
0
answers

Join in 3 tables

I need my query to return who is the direct partner of the company "Father" and the company "daughter". I got him back to the daughter company and the direct partner, but I need him to get me back if the daughter company has a partner. can anybo...
asked by 02.12.2018 / 19:01
0
answers

Time Out when trying to run query in Mysql

I'm running the following code: SELECT e.*, e.CO_ESCOLA, es.CO_ENTIDADE FROM enem20162 e INNER JOIN escolas es ON e.CO_ESCOLA = es.CO_ENTIDADE #WHERE CO_ENTIDADE = ORDER BY e.CO_ESCOLA; I want to return students who are connected to a sch...
asked by 08.11.2018 / 14:49
1
answer

How to bring data from another table related to a userid (JOIN ???)

I have the following tables: Users Andinvestments Theinvestmenttablehastheuserid.I'malreadygettingregistered.HowdoIshowonauser'sscreentheinvestmentsmadebyhim?I'malreadyabletoregisterandhavetheuseridrecordedrightaway.Myscreenwillbethisbelow,I...
asked by 12.10.2018 / 06:18
0
answers

ERROR: missing FROM -clause entry for table "tX" when using LEFT join - Eclipselink and PostgreSQL

I'm getting ERROR: missing FROM-clause entry for table "t3" when trying to use the following JPQL: SELECT primeira FROM PrimeiraClasse primeira LEFT JOIN primeira.segunda.terceira.quarta quarta ON (quarta.quinta = primeira.quinta) ORDE...
asked by 08.10.2018 / 20:43