Questions tagged as 'sql'

1
answer

Query with pivot table - SQL Server 2014

I have 3 tables: Persona(IdPersona(PK), NombreYApellido, IdTelefono); Telefono(IdTelefono(PK), Numero, IdTipoTelefono); TipoTelefono(IdTipoTelefono(PK), Descripcion); To relate them I created the table PersonasTipoTelefono(IdPers...
asked by 07.09.2017 / 17:18
1
answer

SQL Server procedure always returns int

If I run the following code in
asked by 15.08.2017 / 16:19
2
answers

insert image in SQL field IMAGE with Java

I want to save my image in a database in SQL in a field called fotoEmpleado of type IMAGE , until then everything is fine, because I am saved in BYTES The problem is when reading it, I want to show it in a Label on my form, I underst...
asked by 09.08.2017 / 07:10
1
answer

How to update fields by querie of databases of different servers?

Good day, I hope and you can help me. I have 2 databases that are located on different servers, my idea is to update some fields through a query, however they are on different servers, for example I have one base on a server termination 192 ......
asked by 07.08.2017 / 18:43
2
answers

SQL Query to add fields from different tables

Someone who can help me with this query. I have three tables with different names. Tabla Ejemplo1 fecha campo1 2017-01-01 0.00 2017-01-01 7.00 2017-01-01 0.00 2017-01-01 1.00 2017-01-01 0.00 2017-01-02 1.00 2017-01-02...
asked by 08.08.2017 / 10:17
1
answer

implode of columns and rows of DataTable C #

I am trying to make a data insertion, of a dataTable whose data has been passed from an sql query, I want to dump this data into another table, as they come. This function will do it for several tables, so the column names and the quantity ca...
asked by 22.09.2017 / 18:08
1
answer

Join 2 SQL tables

I have these tables in sql . Table 1 ---------------------------------------------------- | articulo | Ubicacion | Existencia | ---------------------------------------------------- | 200116 | cy1112 | 1...
asked by 25.07.2017 / 17:37
1
answer

Bring a row that is not in one of the 2 tables

I have this query in sql SELECT SI_Articulo = COALESCE(t.SI_Articulo, c.SI_Num_Articulo), SI_Ubicacion = COALESCE(t.SI_Ubicacion, c.SI_Ubicacion), SI_OV = COALESCE(c.SI_OV,''), SI_Ubicacion_Fisica = COALESCE(c.SI_Ubicacion_Fis...
asked by 26.07.2017 / 18:08
2
answers

Table sys.sql_logins in SQL Server 2000

table sys.sql_logins in SQL Server 2000 validation of the following query in SQL Server 2000; SELECT RIGHT(name, 10) name, CASE WHEN is_disabled = 1 THEN 'No' WHEN is_disabled = 0 THEN 'Si' END [¿Habilitad...
asked by 21.07.2017 / 18:40
2
answers

Efficient way to empty tables in ORACLE

I have a procedure that empties an auxiliary table and reloads it every time it is invoked. The command used to delete all records is: DELETE FROM T1; To my surprise, removing 500.000 records with this command had a cost of approxima...
asked by 22.07.2017 / 17:22