Questions tagged as 'sql'

1
answer

Syntax error in MySQL script

I created a simple script in MySQL .... the idea is to create a procedure that shows the data of the last record of a specific table. This would be the code of the script: DROP PROCEDURE IF EXISTS mostrarUltimaAlta; DELIMITER $$ CRE...
asked by 02.12.2016 / 17:05
2
answers

Pass a VARBINARY to INT as a listing in sql

I have a database in which one of its columns is of type of data VARBINARY (MAX) and at the moment of making the query it brings me the data thus 0x7D7D7D7E7E80818182828384848483828281817F7F7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7 in a...
asked by 30.11.2016 / 18:19
1
answer

Create a match query in 2 tables with elasticsearch 2.3

As I can make a query between 2 tables, I have the following tables Company: - id - name - domain - timestamp Target - id - name - domain - company - website - company_id - timestamp User - id - firstName - lastName - email - company_id -tim...
asked by 16.11.2016 / 05:35
3
answers

Help with clause Where in MySQL and PHP for android

I'm making an Android application and I need to make a query in sql using php but I do not know why it does not return anything when I ask. This is a java code for Android: AsyncHttpClient client = new AsyncHttpClient(); final String u...
asked by 15.11.2016 / 04:00
2
answers

Problem with NOT EXISTS in SQL

I have a problem with a query in SQL. I have my table pedidos that has the fields numero pedido , fecha recepción and código cliente and I need to generate a list of the clients that have not placed orders in a certain...
asked by 11.11.2016 / 02:35
1
answer

'FOR' cycle in SQL

I have a query in sql which columns of the result table are the months of the year: January - December. DECLARE @Ventas MONEY declare @i int declare @ano int declare @mes int set @ano = 2016 set @mes = 12 set @i = 1 WHILE @i <= @mes BE...
asked by 27.10.2016 / 17:27
2
answers

I do not work the tables made in MySQL on Microsoft SQL Server 2014

SET SESSION FOREIGN_KEY_CHECKS=0; /* Drop Tables */ DROP TABLE IF EXISTS SE_COMPONE; DROP TABLE IF EXISTS ARTICULO; DROP TABLE IF EXISTS PEDIDO; DROP TABLE IF EXISTS CLIENTE; /* Create Tables */ CREATE TABLE ARTICULO ( num_serie numeri...
asked by 04.01.2017 / 21:43
1
answer

GroupBy on nodejs mysql

I do not know how to do the query, being more specific I do not know how to put the group by in my query, here goes my code objBD.query('SELECT u.ID_U, u.nombre, t.ID_T,t.tiempo, t.iteracion from USUARIO u INNER JOIN TIEMPOS t ON u.ID_U=t...
asked by 05.11.2016 / 19:39
2
answers

Modify SQL query to obtain expected results

Background I am generating a series of reports based on information contained in a database in SQL Server. For purposes of the question, I will call this database: Test . From the Test database, I get the time at which certain user...
asked by 29.09.2016 / 19:08
2
answers

How to export a database to Excel and mail

How it would be the code to export the data that are inserted in a database .sdf to an excel file. in C # and for visual studio 2008 and SQL Compact 3.5, and my other question would be if I need to call a method within    writer.WriteLine ();...
asked by 02.09.2016 / 18:58