Questions tagged as 'sql'

1
answer

Detail with SQL - UNION & ORDER BY

I have the following query SELECT matricula_veh as 'Identificacion', concat(marca_veh,' ',modelo_veh) as 'InfoName', 'Vehiculo' KindData FROM vehiculos UNION SELECT id_per as 'Identificacion', concat(nom_per,' ',ap...
asked by 19.10.2016 / 03:10
1
answer

Error with project interface

Buens, some have an idea of why the graphical inteface of a project can change drastically when uploading to IIS7 (windows and), I have a project and when I run it locally everything is fine, but in IIS the interface changes and some functions t...
asked by 20.10.2016 / 19:38
1
answer

INSERT INTO ... SELECT ... ON DUPLICATE KEY

I need to know what could be wrong with this query: INSERT INTO 'turnos_enviados'('rut','hora_envio', 'turnos') SELECT "12345678", 'hora_envio'+1, "string cualquiera" FROM 'turnos_enviados' ORDER BY 'hora_envio' ASC LIMIT 1 ON DUPLICATE KEY UP...
asked by 08.11.2016 / 05:34
1
answer

How to give privileges to a user to execute all the procedures?

In Mysql, as I can give permissions for a user to execute all the procedures, I found: GRANT EXECUTE ON PROCEDURE miBD.miProcedure TO 'USER'@'localhost'; As you can see you can only give permission to one procedure but not all, how to give...
asked by 18.10.2016 / 19:32
1
answer

SQL query with two tables

I have two configuration tables, one general and one specific: table configurations : codigo contenido codigo_ga UA-GENERICO table configurations_domains : dominio_id idioma codigo contenido 1...
asked by 15.10.2016 / 00:42
1
answer

Error creating trigger as SYS in Sql Developer

Well that's the problem, I'm going to create triggers in Sql devleoper as SYS, and when I run the script, it does not leave me, any advice on how to fix it?     
asked by 01.11.2016 / 17:16
2
answers

Bitacora of a database?

I need to create a trigger that registers the insert, update, delete that happen in a certain table. For this, I have the following code in which, within the trigger for insert that I already have defined, I miss an error in saying that the name...
asked by 01.11.2016 / 20:32
1
answer

SQL - Assign a value in a data recovery operation

In a simple query, I have a table with the following structure: SELECT * FROM [SAMX].[dbo].[REPORTE_ESTADO_CUENTA_GLOBAL] where intencion_id=1657 ORDER BY intencion_id,fecha I need to fill in the column with a '0' or a '1' depending o...
asked by 28.11.2016 / 19:22
1
answer

Mysql one to many relationship (bring the information at the same time)

If I have a relationship from one to many tables there are 5 tables the main one and the other 4 tables If I have to bring the information of the 5 tables at the same time what would be the correct way to do it? what I did were 5 different st...
asked by 09.10.2016 / 03:12
2
answers

Query to select first record in both PostgreSQL and SQL Server

I need to select the first record of a query. But the problem is that top 1 only works in SQL Server , but not in PostgreSQL . And in PostgreSQL it works with limit but in SQL Server no. These are the examples. I would greatl...
asked by 19.09.2016 / 16:16