Questions tagged as 'sql'

2
answers

JoinS About the same Table with Null Values

You are trying to perform two JOINS to match the information of two tables, the first table contains a catalog of articles. id_art desc ------------------------ A1 Articulo A1 A2 Articulo A2 A3 Articulo A3...
asked by 11.05.2017 / 21:08
1
answer

Normalize database up to the Third Normal Form

I am designing a database for the Film industry (personal exercise). Each film was made by a company. A company produces one or more movies. Each film has one or more genres (action, terror, etc ...) Each film has one or more actors....
asked by 09.11.2017 / 20:14
1
answer

Show data with result in zero mysql

I have a database that makes queries to know the amounts of detailed information of each table, which are sorted through a "country table". When you perform the query, only the information that contains data appears, for example: in the count...
asked by 08.11.2017 / 14:46
2
answers

Open DTS files in Sql Server 2012

I want to migrate several Integration Services packages from sql 2000 that have a .DTS extension to DTSX. I currently have Sql Server 2012 and I can not pass them to DTSX. Is there a direct way to migrate them, without needing to convert t...
asked by 31.01.2017 / 17:28
3
answers

Foreign key table - oracle sql

I have a table in Oracle SQL, and a field, I want it to be a foreign key of the same table, but Oracle gives me an error. create table Empleado_almacen ( cod_empleado_almacen int, dni varchar2(9), dni_jefe varchar2(9), nombre varchar2(30), dir...
asked by 09.06.2017 / 12:03
1
answer

I have a problem in a postgresql query

I want to do a filtering by ID number but this is a numeric type and the like does not accept it as I can do? the query is this "SELECT * FROM cliente WHERE identif LIKE '_%'"; where identif is of type numeric     
asked by 21.12.2016 / 01:38
1
answer

How to solve this exercise in MySQL

Can anyone help me with this exercise ?: Show for each contract the total amount of commissions, amount payable, amount paid. The tables that are named in it are: Contracts: dni, cuit, nro_contract, cod_cargo, salary, percentage_comi...
asked by 14.12.2016 / 20:36
1
answer

get the sum of an attribute in sql

I have these two tables I want to get the sum of the states of all the users, for example user1: estado=1 user1: estado=0 user2: estado=1 user1: estado=0 user1: estado=1 user1: estado=1 user2: estado=0 user2: estado=1 I want the s...
asked by 08.01.2017 / 05:05
1
answer

Replace all NULL fields in a table to 0 SQL Server

Greetings to all, I have a table that contains about 97 fields. I know that by selecting the fields and adding functions like Coalense, isnull or null; can be converted to 0. However my question is a bit complex. Is there any way to identify...
asked by 28.04.2017 / 19:51
2
answers

Query with data grouped by time, whether it exists or not

Currently I have to make a report based on a query, the query that is made should return all stoppages that have occurred in a range of determined dates every five minutes, if there is a record that meets that condition for that interval should...
asked by 07.08.2017 / 12:28