Questions tagged as 'sql'

1
answer

Repeat javascript cycle

Good evening, I have this view (the image) which is part of an invoice, precisely this is the detail of the invoice, and I have in this detail a javascript function so that while I write the name of the product I search the product in the databa...
asked by 06.11.2017 / 04:03
1
answer

Problem in condition query SQL MYSQL

Good mates I have a problem with an SQL query in MYSQL, I explain to you how are the tables, I have a table of Events that basically are birthdays, they have among other things a start time and a Finally, I have another table of Materials th...
asked by 30.12.2017 / 00:55
2
answers

Display data without repeating

I need help with my sql query. My query is: select * from matricula and show me this information: nummatri fechamatri dnialum idnivel idgrado idsecc año 3 2017-12-20 12357890 2 7 14 2018...
asked by 22.12.2017 / 03:36
1
answer

Show available rooms according to two dates entered (ranges)

The idea is that entering the date of entry and date of departure; Show the available rooms by comparing with the reservation dates made. Assuming the following tables and data: CREATE TABLE Habitaciones ( habitacion_numero INT );...
asked by 20.12.2017 / 00:42
1
answer

Join results in SQL Server

I would like to know how I can do to join the results of several selects in the same temporary table if possible, or if there is another way to do it. This is the code that I have at the moment: Declare @mod as int; Declare modelos c...
asked by 26.12.2017 / 21:40
1
answer

In an sql query, is there an order to declare the join?

I have always had the doubt if it is the same or if it has consequences to make a query of the following forms, or if there is some standard to follow when establishing the order of a join depending on whether or not the table is has the foreign...
asked by 19.12.2017 / 13:49
1
answer

Select all the clients whose name is repeated

To get all the clients out without repeating the names is very easy. SELECT distinct firstname FROM client And to get all the clients whose name is repeated more than once is not very complicated either. SELECT count(*), firstname FROM cl...
asked by 02.10.2017 / 17:15
1
answer

Transpose data with 2 columns (PIVOT)

People, I appeal to you because google has not served me much for what I need. I'm looking for a way to perform a dynamic pivot with 2 columns. Example: I have this: id rut fecha entrada salida 2 15114999...
asked by 15.03.2018 / 22:00
2
answers

Problem when plotting with Highcharts and AJAX

I am trying to make a dynamic graphic, that I pass the data by AJAX, that when selecting a MES graph me according to result, it happens that in the browser console it shows me results according to the query but it does not graph me, and I...
asked by 26.09.2017 / 19:05
1
answer

How to subtract the results of a query in SQL?

I have the following query: SELECT ID,PLACA,SUM(GALONES) AS GALONES,SUM(MONTO) as MONTO,MONTH(FECHA1) MES,YEAR(FECHA2) AÑO FROM [db_stransportacion].[dbo].[v_combustible_Asignado] c INNER JOIN [db_stransportacion].[dbo].[t_Vehiculo] v ON c.ID=...
asked by 09.03.2018 / 16:34