Questions tagged as 'sql'

2
answers

Import CSV to SQL Server 2012 With descriptive fields with commas

I have a .csv file that I need to import to sql server 2012. I have already created the table Then perform the insert. The problem I have is that in the table there are descriptive fields that have commas within themselves, for example in the...
asked by 17.07.2017 / 09:30
1
answer

Subtract column value from the same column, previous record

Good afternoon, I have a table Control_Kilometrajes of which I need to get a new column called Recorrido , and is drawn from the column Kilometraje : the greater mileage is subtracted the lower, while Placa_FK be the sa...
asked by 07.09.2017 / 01:53
1
answer

My RecordSet always returns -1 in its RecordCount property

The select is done correctly, because when controlling the Fields property it shows me the names of the fields in the debugging. This is my code: Dim RS_Personas As Object Set RS_Personas = New ADODB.Recordset Dim Consulta_SQL As String If N...
asked by 01.08.2017 / 14:43
1
answer

The date data is repeated

I have this query in SQL Server: SELECT r.id_referencia ,t.id_tipo ,o.id_operacion ,p.id_provincia ,s.id_superfice ,pr.id_precio ,v.id_vendedor ,f.id_fecha FROM vendedor v JOIN Inmuebles i ON v.nombre_vendedor = i.v...
asked by 28.06.2017 / 22:56
2
answers

Trigger SQL Server insert record if certain field is updated

Good afternoon colleagues I have this trigger to insert a record but only if the teststatus field changes, but even if there are other fields that are updated I still insert the record someone knows why create trigger trTestStatusInsertarAct o...
asked by 28.06.2017 / 22:54
2
answers

Multiplication in sql, error by INNER JOIN

I have this Query 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_Fisica,''),...
asked by 07.07.2017 / 21:12
2
answers

Export flat file with special characters in C #

I have a query from SQL , I show it in a GridView in a web page ( ASP.NET ) and from there I export it to a flat file delimited with C # and I have problems with accents and special characters. For example, the word MUÑOZ , that th...
asked by 07.07.2017 / 00:49
1
answer

Delete a row from a single table by doing INNER JOIN from several tables

I have the following tables: users : +----------------+-----------------+------+-----+-------------------+-----------------------------+ | Field | Type | Null | Key | Default | Extra | +-...
asked by 27.06.2017 / 21:53
2
answers

Problem with SQL Server queries

I have a database of students of a university in which each form corresponds to a particular subject. The DER (Relationship Entity Diagram) is the following: and I have problems with the following statements to solve: 1) Show the st...
asked by 26.06.2017 / 00:11
1
answer

Problems with JOIN MySql

Dear friends, I really have a serious problem, I have several tables that store certain information of users such as their facebook, twitter, instagram, image, email, etc ... I will show the SQL and explain the problem: SELECT IF...
asked by 25.03.2018 / 20:27