Questions tagged as 'sql'

1
answer

Query Sql to bring data if they exist or not according to the relationship

I have all the months and in each month, there is some data (Enrollment), given the case that there is no data in that month I want that month to appear with a zero. This is the query I have: Select meses.mes as MES, SUM(cantidad) as M...
asked by 05.06.2018 / 20:53
1
answer

Group query without losing different records

I need help making the following query: From the permissions table, obtain the user's row without losing data from the action and value column. Greetings,.     
asked by 06.06.2018 / 17:18
1
answer

How the SQL Agent is active in SQL Server Management Studio

I want to use a job in my data base, for that I need to activate the Sql Agent Try to activate it from my control panel but it still does not appear to register my job     
asked by 02.07.2018 / 20:48
1
answer

Unexpected result in a statement when using ALL

I have created the following tables: productstest orders The query is as follows: SELECT nombre FROM productostest WHERE id = ALL (SELECT idProducto FROM pedidos WHERE cantidad > 0); This query does not return an...
asked by 09.06.2018 / 16:58
1
answer

Javascript function that does not work

Good afternoon everyone what happens is the following I have a function in JavaScript which cancels letters in a textbox and does not work I have the following $(function () { $(".numbers").keydown(function (e) {...
asked by 17.09.2018 / 21:22
2
answers

Data Grouping

Good evening, I need to make a query and I do not give with the one I need. I have a table with activities, which last, or not, more than one day, and in each activity 1 or up to 3 employees who perform the activity, it would be something like t...
asked by 04.06.2018 / 02:18
1
answer

Error Trigger AFTER DELETE

I have the following code: create or replace trigger calckmdl after delete on tsegmento for each row declare total rutas.km%type; begin if deleting then select km into total from rutas where ruta=:new.ruta; if :old.unidad = 'km...
asked by 26.06.2018 / 02:30
1
answer

Extract data from the database in columns of three

I need help to put the data brought from a database into an HTML table. I have this code: <div class="card-block"> <?php $sql = "SELECT idEmpresa,nombreComercial FROM empresas"; $objetoBBDD->consultarBD($sql)...
asked by 30.05.2018 / 20:59
1
answer

Query Sql with problems

I have the following query select A.AuxstockArrProductoId, B.ProductoNombre, (A.AuxstockArrSubctaCant)as total from AuxSctaStockArr A inner join Producto B on A.AuxstockArrProductoId = B.ProductoId group by A.AuxstockArrProductoId having...
asked by 29.05.2018 / 00:22
1
answer

Convert an element of an array into a string in php

I have a list of people that I bring from my bd , I want to go through that list and change each person in my list one of the attributes of the same one that is of type int as it can be the document of the person and pass that param...
asked by 24.05.2018 / 17:32