Questions tagged as 'join'

4
answers

Select with several Left Joins Sql Server

I have taken an example of a people register with the following structure: I'mtryingtomakeaSELECTintblPessoawithJOINwiththeintentionthatselectreturnsthedataofthetableinwhichtheIdexists,selectselect:selecttblPessoaJuridica.Nomeas[NomePJ],tblPess...
asked by 26.01.2017 / 21:28
1
answer

How to reuse a pthreads?

I'm using pthread.h and using the following functions: // // Cria A thread // thread_argsPP[contthreadsPP] = contthreadsPP; pthread_create(&threadsPP[contthreadsPP], NULL, ReceivePinPad, (void *) &thread_argsPP[cont...
asked by 21.07.2016 / 15:13
1
answer

Number of rows increases after use of JOIN

Hello, I'm new to SQL and am having a question. As in the example below, I wanted to get a description of the code in the 'a' table from a table 'b'. But the number of rows in table 'a' when I do this increases significantly. select a.banana,...
asked by 11.08.2016 / 00:30
2
answers

PHP - How do I make the left join with more than one record in the other tables not return repeated values in the columns? [closed]

I need to perform a SQL query in PHP, where I need to create a table from other 9 tables, joining all the columns with a LEFT JOIN, and with the 'Client' field as the key between the tables. However, in each table there is more than one record o...
asked by 11.01.2016 / 16:59
3
answers

2 COUNT within a SELECT with LEFT JOIN

I have two tables: Users: id | nome | email submissions: id | id_envia | id_recebe Every time a user sends a card (which goes by email) to another user, it marks this table, and every time it receives a tag as well. Doubt: I...
asked by 09.03.2016 / 20:52
1
answer

SQL statement error

I have the following DB: WhenIrunthefollowingQuery:SELECTtbCelula.*FROM(((tbTiposMonitorizacaoINNERJOINtbMonitorizacaoProjONtbTiposMonitorizacao.TM_ID=tbMonitorizacaoProj.MP_T_ID)INNERJOINtbListaConformidadesONtbMonitorizacaoProj.MP_ID=tbListaC...
asked by 11.12.2015 / 11:28
2
answers

MySQL - Select between 2 tables with field "String"

I would like to know how to do a Select to return non-existent records by comparing two tables with the String field. Example: Tabelas Campo1 Campo2 Tab1 Nome Tel Tab2 Nome email The result of the comparison (the select)...
asked by 26.07.2018 / 16:36
1
answer

Do a SELECT multiple tables and save in a worksheet

I'm trying to do a SELECT with multiple tables, where I have a product with your information, and I have another table structure to be able to add an extra field and their respective information. What I tried to do was this: SELECT p.codigo...
asked by 30.07.2018 / 20:13
2
answers

Inner Join - SQL Server

Folks, I need somebody's help to understand the mistake you're making. I have two tables as shown in the code, and in one of the tables the "CodePlane" column has information. I need to put the codes related to the Beneficiaries. But it is giv...
asked by 22.02.2018 / 15:54
1
answer

Adding records with type_type in another table

I have 2 tables linked by id and I need to add a field in table 2 by grouping through a field in table 1 -----TABELA 1----- ID_tab1 - tipo_pgto -----TABELA 2----- ID_tab2 - ID_tab1 - valor_pago I want you to show me the sum of the amount p...
asked by 17.11.2015 / 05:18