Questions tagged as 'sql-server'

2
answers

Apply an INSERT in a query with UNION

Insert information in temporary tables as follows: SELECT * INTO #AR_TABLA_TEMP_1 FROM PERSONAS I have to do the same but with a query that has the statement UNION SELECT * FROM AR_SALDOS_TOTALES_CVEN UNION SELECT 'TOTAL' AS TERRIT...
asked by 12.11.2018 / 23:25
1
answer

Query with PHP PDO and SQLServer

I am trying to make a query with PHP to a database in SQLServer with ajax and MVC but when I execute the query it throws me the following error sqlsrv_fetch_array() expects parameter 1 to be resource, boolean given...
asked by 02.12.2018 / 07:59
2
answers

Group records by column without the null value (Sql Server)

Dear friends, I have the following query: IF OBJECT_ID('TEMPDB..#TOTALHORAS') IS NOT NULL BEGIN DROP TABLE #TOTALHORAS; END SET LANGUAGE SPANISH; CREATE TABLE #TOTALHORAS( EMPLSECCION VARCHAR(100), EMPLMINUTOS VARCHAR(100), EMPLMINUTOSN...
asked by 16.11.2018 / 21:43
3
answers

How to show in jframe the results of the sql statement?

I would like to know what I am doing wrong in the code, it turns out that I try to get the data of the statement sql in the JFrame . I leave the code what I have package Formulario; import Formulario.Menu; import Clases.*; import jav...
asked by 25.06.2016 / 02:16
1
answer

Save Image in SQL Server using PictureBox

Good morning, I am working with an application within C #, which works as an inventory for the teams within the company. I'm working inside Windows Forms. What I intend to do is keep the records of each computer, with its respective image for...
asked by 15.10.2018 / 20:12
1
answer

"Operand type clash: int is incompatible with date"

This code is very basic ... Could you help me? create database Escuela create table Maestros ( usuario int not null, name varchar(50), country char(2), birthdate date ); insert into Maestros values (1, 'Emmanuel', 'MX', 1996-07-23);...
asked by 08.04.2016 / 06:56
1
answer

SQL problem to add rows SQL SERVER

I need to add the salaries of the next query I have and sort them by description. select distinct cp.descripcion, cp.idSysCPPuestos, em.sueldoDiario, em.sueldoIntegrado, em.idSysCPCentroCosto --,sum(CAST(em.sueldoDiar...
asked by 23.10.2018 / 17:31
1
answer

Error 5123 restore BD SQL Server 2012

You could help me with this error, when I try to attach the bd, I select the .mdf file and it sends me this error It is worth mentioning that before I could attach the bd, but now I get this error.     
asked by 10.10.2018 / 02:41
1
answer

Help with a query in Postgres that I want to move to SQL SERVER

Good morning friends, I have the following query in postgres. select distinct on (c.cod_socio) tbl.*, h.cod_oficina, h.cod_transaccion, h.num_transaccion, h.num_sec, h.fec_movimiento from sgf_det_mov_his h inner join sgf_cuenta c on c.co...
asked by 26.09.2018 / 17:37
3
answers

As SELECT in second Rank of Top

I want to do this: A thousand runners run a race, take the most clubs, the winner is the first place is Juan with 200000, second place Pedro with 50 and the third place Pedro with 2 sticks. I must select by name Pedro that only sees the secon...
asked by 18.10.2018 / 00:01