Questions tagged as 'sql'

0
answers

Validate duplicate records when uploading CSV

What I need is to be able to upload a .CSV file, and if in the bd there is already a record with a duplicate RETURN and PROCESS number, I skipped a script saying that there is already a record with that number of the form and process . So far th...
asked by 10.07.2017 / 14:24
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 / 13: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 / 18: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 / 05: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 / 17:49
0
answers

error connect java to database hostinger: Access denied for user '******* _ ****' @ 'localhost' (using password: YES)

/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package parte_conexion; import java.sql.Connection; import j...
asked by 07.07.2017 / 18:25
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 / 21:09
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 / 15: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 / 15:13
1
answer

Create Table Foreign key failure

I want to create 3 foreign keys in a table such as this: DROP TABLE IF EXISTS puo;CREATE TABLE IF NOT EXISTS puo ( ano INT ( 4 )NOT NULL, empresa CHAR ( 8 )NOT NULL, acro_proyecto CHAR ( 10 )NOT NULL, partida VARCHAR ( 100 ) NO...
asked by 21.07.2017 / 00:28