Questions tagged as 'sql-server'

1
answer

Unable to connect to server SQL SERVER 2000 SQL Authentication

I need to perform a Hardening validation for a SQL Server 2000 database migration to SQL server 2008, trying to connect through some client (Microsoft SQL Server Management Studio) to SQL Server 2000 or from LocalHost with (SQL Query Analyzer )...
asked by 21.07.2017 / 16:48
1
answer

Notify if a record already exists in the database before entering, filtering for three conditions. in visual basic and sql server

Dear good afternoon, I have the following dilemma, I can not do that in my system in visual basic with sql server database, at the moment of wanting to record a new datum in the table, if it exists, warn me of it, fulfilling three conditions at...
asked by 21.07.2017 / 21:45
2
answers

Inconsistency in query result "isnull (column, '') returns a space"

During the process of producing a solution in C # records were saved forming a "folio" with a literal, a cell value and an id 'C'+ISNULL(Columna1,'')+Columna2 Example of result: C96 CX85 The queries have not changed, the same database...
asked by 27.07.2017 / 17:43
0
answers

Return an image from binary data in JAVA - Rest Service

Good afternoon. I have the next portion of code that is within a REST service. String a = "0xFFD8FFE0........."; //el valor de a es un dato tipo image de SQL Server Blob blob2 = connection.createBlob(); blob2...
asked by 12.07.2017 / 23:13
0
answers

Count of two SQL tables and add when different

I have this query: SELECT t.SI_Articulo, m.SI_Descripcion, t.SI_UM, (CASE WHEN c.SI_OV IS NOT NULL THEN '*' ELSE NULL END) SI_OV, COUNT(DISTINCT t.SI_Ubicacion) SI_Ubicacion, SUM(DISTINCT t.SI_Existencia) SI_Existencia, (CASE WHEN SUM(D...
asked by 05.07.2017 / 15:13
0
answers

Sum without distinct and do not add data from another table

I have this query SELECT t.SI_Articulo, m.SI_Descripcion, t.SI_UM, (CASE WHEN c.SI_OV IS NOT NULL THEN '*' ELSE NULL END) SI_OV, COUNT(DISTINCT ISNULL(c.SI_Ubicacion,t.SI_Ubicacion)) SI_Ubicacion, SUM(DISTINCT t.SI_Existencia) SI_Existen...
asked by 05.07.2017 / 20:30
0
answers

Register and list a grid while maintaining its SQL SERVER 2008 edition row

Good I have a problem, I can not correct a STORED PROCEDURE, which works with a web in C # where a grid of 4 rows is found, INSERT normal in the row with the corresponding index but when recording it SUBSET that row INSERTED to the first row, th...
asked by 05.07.2017 / 07:52
0
answers

Using floor in a trigger

Good day sorry I have this trigger to insert a getdate in the register whose code is FLOOR (m.codigoM) but I do not do the operation I'm thinking that the best is very ambiguous conditions that I'm putting. CREATE TRIGGER fechaactual ON c...
asked by 07.07.2017 / 19:49
3
answers

Correct data returned by the stored procedure - SQLServer 2014

Good evening, I have a stored procedure that returns me, according to a certain hotel and a certain range of dates, the number of rooms occupied and the number of free rooms. The problem is that it gives me back the amount of free rooms. I leave...
asked by 29.06.2017 / 03:55
1
answer

Enable database user

How can I enable a user who is offline? I have a user associated with a Login in a database but it is disabled     
asked by 27.07.2017 / 23:09