Questions tagged as 'query'

1
answer

Formula of accumulated Balances Crystal Report

I am wanting to generate a field in my Crystal report that calculates the accumulated balance according to the payments that are made, basically the total - 1st payment = balance1 - 2nd payment = balance2 and so on in each record. I attach an im...
asked by 22.10.2018 / 22:53
1
answer

know how many posts are in another table, for each of the users

I need help: I have a user_table with the items (id, name)  and a table_post (id, user_id, etc ...) I need that when you list the table_users, tell me how many posts each of the users has in another column something like this id, nom...
asked by 22.11.2017 / 22:33
1
answer

Warring: mysqli_query () expects parameter 2 to be string, object given in

I leave the code so you can help me: <?php session_start(); include ('Connections/conexion2.php'); $arreglo=$_SESSION['carrito']; $numeroventa=0; $re=mysqli_query($con, "SELECT * from compras order by numeroventa DESC limit 1") o...
asked by 11.06.2018 / 04:14
1
answer

Error with query adding fields from different tables in MySql

What I'm looking for is for me to add up the total amount of each field and show it to me but what it shows is a text, I do not understand why this happens CODE: SELECT totales_bonos.idEmpleado, 'bonos.pmonto' Bonos,...
asked by 24.04.2018 / 09:16
1
answer

Find coordinates in X Km round

I need help with this SELECT : SELECT CONCAT( '[', GROUP_CONCAT(JSON_OBJECT('id', h.hotel_id , 'nom', h.nom, 'estrelles', h.categoria, 'puntuacio', h.puntacio, 'tipus', h.tipus, 'descripcio', h.descripcio, 'adreca', h.adreca, 'lat', h.latitu...
asked by 16.03.2018 / 09:58
0
answers

Error converting date to SQL statement

I get this error    Mens. 241, Level 16, State 1, Line 1 Conversion failed when   converting date and / or time from character string. When executing the following query: Select TOP 1 T2.Text12 AS DPI, T2.Name AS NAME,...
asked by 31.12.2018 / 10:41
3
answers

How to insert 100 records in a SQL Server table at the same time [closed]

Could you support me? I need to insert 100 records at the same time in a user table and I know that it can be done through a query, unfortunately I do not know much about SQL to do so and insert one at a time would be very slow. The table con...
asked by 05.07.2018 / 16:43