Questions tagged as 'join'

3
answers

Add Cast in SQL SERVER

Hello friends I want to make a sum of a series of elements that "cast" to decimal , this is what I am trying to do. But he says    Incorrect syntax near 'sum'. select sum( SELECT CAST(em.sueldoDiario AS DECIMAL(18, 4)) ) from sysCPPues...
asked by 19.10.2018 / 18:03
4
answers

Consultation with LEFT JOIN Mysql

I have three tables with the following data: varieties ------------------------------------ id | variety | status | ------------------------------------ 1 | VS1 | 1 | -----------------------------------...
asked by 18.09.2017 / 18:55
1
answer

MySQL join / inner join 3 tables

I have 3 related tables. Users, in which I get the following columns (username). Submissions, I get the columns (id, title, thumbnail and rate). It also has the user_id column to know which user made the upload. Favorites, I get the 3 co...
asked by 28.02.2017 / 12:18
2
answers

Print Joins data

Perform the following sql, which has an inner and a left to look up the overhead and individual user data. They are in different tables when doing the sql queries but I do not group the result to show it in the same td, resulting in this...
asked by 30.11.2018 / 06:49
2
answers

Group or Count SQL Server repeated values

This query brings me the information correctly with the difference that it brings me the duplicates, so what I want to do is another column where you tell me how many times the same number is repeated in this case the repeated ones are here (E.N...
asked by 29.08.2018 / 21:34
2
answers

Sentence for an inner join to two fields in a table

I have Tables A and B. In B I have two fields that contain the Ids of A to make relationships in a php report. However I run into a problem: that I can not do a INNER JOIN to show those two fields; TABLA-A id Nombre ===============...
asked by 24.02.2017 / 16:39
1
answer

Use subqueries or joins? Alternatives to left | right join? [duplicate]

Good morning. My Doubt is: Which is better in terms of readability and performance, use subqueries whenever possible or use the "join" format? What is more important, readability or performance? I would understand that many would say that if t...
asked by 15.07.2017 / 00:17
2
answers

Perform join on a table depending on the value of a field

I'm trying to make a query in Mysql and according to the column type of my table reports, make a JOIN to one table or another. Reports: In type the type of the item to which it is reported is stored, whi...
asked by 03.02.2017 / 23:24
3
answers

I can not nest joins with SQL statements in Access 2013

I test this in Access 2013 and says there is an error, but it does not specify which one. SELECT DISTINCT factura.n_factura, factura.data, factura.import, factura.concepte, departament.nom, programa.nom, despesa.nom, emisor.nom, destinatari....
asked by 02.12.2016 / 19:52
1
answer

INNER JOIN query on Android with SQL Server [closed]

I need to make a select query with two different databases. How could I? From the database Xtraining I have the table dbo.tbUsuarioOperario with the field idOperario . From the database Workflow I have the...
asked by 14.11.2016 / 15:58