Questions tagged as 'sql-server'

1
answer

How to indicate with value 0 that there are no records in SQL?

I have the following query in SQL where I am getting the Incidents of the employees in a report, this by the Date From and Date Until, in that period I must show the total number of Incidents (Fouls, permits, holidays) what it has, with what I h...
asked by 03.07.2017 / 17:24
1
answer

check and default values

I have a store to keep records, I would like to know how I can do it to have values check but if I do not enter any value have a default I tried to put them out of the store by doing alter table but I get an error: cla...
asked by 03.07.2017 / 17:13
0
answers

PHP Notice: Undefined index when generating report with PHPExcel

I am generating a report in Excel, however, when I try to add two columns and show them in: sumHoras = dateInput + dateExit a) The result is successful as long as the operation is carried out in this way: -> setCellValue ('I'. $ i, abs ($ dat...
asked by 27.06.2017 / 23:22
0
answers

Join two SQL Server queries into one

I have to do these two consultations one Query 1: SELECT r.id_referencia ,t.id_tipo ,o.id_operacion ,p.id_provincia ,s.id_superfice ,pr.id_precio ,v.id_vendedor FROM vendedor v JOIN Inmuebles i ON v.nombre_vendedor =...
asked by 28.06.2017 / 21:21
2
answers

Stored procedure to select fields from different tables with COUNT function - SQLServer 2014

I need to make an SP that allows me to show for a certain hotel and in a range of dates, the number of free rooms and the number of rooms occupied. Then I have to group them by date and category. I have the tables: Hotel, Reservations, Category...
asked by 28.06.2017 / 20:03
1
answer

SQL SERVER Owners of an object

I would like to know if there is any way to know the owner of an object in SQL SERVER     
asked by 26.06.2017 / 20:32
1
answer

How to send a procedure stored in the controller in ASP.NET MVC and Entity framework

I have this code in my controller and my stored procedures are already mapped. I access the database through Entity framework and the edmx is defined. I would like to know what the code is like to send (use) my stored procedure to...
asked by 22.06.2017 / 18:32
0
answers

I try to update a table using the lines that have a datagridview and the values are inserted empty

cnn.insertarimagen(textBox1.Text, pictureBox1); First I insert an image to the table and a name to the image and then I try to update, but the values update, but the values remain empty, not null but empty, apparently the variables that you c...
asked by 18.06.2017 / 15:11
0
answers

Because I get an error trying to update a table using data from a datagridview

SqlCommand insertar = new SqlCommand("update reparaciones set ([Codigo del Cliente]=@1,Nombres=@2,Apellidos=@3,Telefono=@4,Celular=@5,Dispositivo=@6,Modelo=@7,Color=@8,[Notas de Condiciones]=@9,[Reparaciones a Realizar]=@10,[Codigo Pieza]=@11,Des...
asked by 17.06.2017 / 16:39
0
answers

Enter Data to Different Accounts and save your content

I need you to help me with something, I am making a system and in one of the forms I have to enter notes to the students according to the account number, what I need is that when entering a different account the data is saved only for That accou...
asked by 18.06.2017 / 00:13