Questions tagged as 'sql'

1
answer

Dynamic parameters in Reporting Services

I am currently generating a report using the SWL Server Business Intelligence Development Studio 2005 since it is the reporting version used by my client. Your request is a report with 2 filters, one per region, and another one for stores, bu...
asked by 01.03.2017 / 18:12
1
answer

Arithmetic overflow error converting numeric to data type numeric [closed]

I have the following error when executing a script:    Arithmetic overflow error converting numeric to data type numeric. I have a table called TBL_ADENDA_ACH in a development database and I run the following script: SELECT * FRO...
asked by 07.02.2017 / 20:03
0
answers

Calculate the difference between a previous value and a following value in Access [closed]

Good, I need to perform a calculation that brings me the difference between a current value and a previous value ..... The schema would be the following: Fecha | Costo | Diferencia 15/02 | 1500 | 0 17/02 | 1600 | 100 19/02 | 1500 | 10...
asked by 21.02.2017 / 13:14
1
answer

Dates stored and date retrieved vary in mysql DB

In my database I have the date stored 01/02/2017 15:17:34 p.m. Inserted as follows: objBD.query('SELECT u.ID_U, u.nombre from USUARIO u where u.nombre=?',[nombre], function(err, rows, fields) { var created = new Date(); cons...
asked by 03.02.2017 / 05:23
1
answer

Change sql query

I have the following query to obtain an average of some data of the 52 weeks of the year in the following way: $dates = array(); $firstDate = date("Y-m-d", strtotime('first day of January 2016')); $lastDate = date("Y-m-d", strtotime('last day...
asked by 03.02.2017 / 20:42
2
answers

php make a web with login and navigate inside without losing the logeo of the web

Hi chic @ s I have this script: <?php session_start(); include_once "conexion.php"; function verificar_login($user,$password,&$result) { $sql = "SELECT * FROM usuarios WHERE usuario = '$user' and password = '$password'"; $r...
asked by 02.01.2017 / 22:56
0
answers

Error Query SQL: SQLGrammarException

I have problems with the following @Query, to which I can not find error reason: SQLGrammarException @Query("select distinct e.issue.company from CreditLinesAmendmentEntity e where " + "(e.issue.ownerBank!=null and (e.issue.ownerB...
asked by 28.12.2016 / 21:26
1
answer

Query between 4 mysql tables with foreign keys (foreign key)

I have these tables in my database to assign roles to my users: tbl usuario id nombre contraseña correo fk_rol -------------------- tbl rol id_rol nombre descripcion -------------------- tbl pagina...
asked by 21.01.2017 / 21:50
1
answer

Variables bind_result () can be equal to bind_param ()?

I'm starting to see the prepared statement of SQL . I have the following code for a simple login : $stmt = $mysqli->prepare("SELECT id_admin,usuario,hash_pass FROM admins WHERE usuario = ?"); $stmt->bind_param("s", $usuario); $s...
asked by 18.01.2017 / 17:26
1
answer

Stored procedure response (SQL)

I am trying to do a procedure stored in SQL for a restaurant sales system that when adding a dish to a sale check if there is stock of the ingredients available and return a response 1 if there is or 0 if there is not. ALTER proc [dbo].[ch...
asked by 27.12.2016 / 00:22