Questions tagged as 'sql-server-2012'

1
answer

Insert correlative to an ID field in SQL

I'm currently making an export with this Script: /* FromTable 1:Otrntransaction, 2:OtrnTrnTaxAmount, 3:Marckup */ SELECT '1' AS FromTable, T1.ID_Trn AS IdDiarioTrans, T1.PostingDate AS Fecha, T2.AccountNo AS Folio,...
asked by 07.06.2018 / 19:40
0
answers

I have two tables table1 and table2, I want to enter the data from table1 in table2, but there are duplicates

I added a new field to the table 1 of the name delete to mark the ones that are duplicates and that are marked in 1 with the following code, but when you delete them and try to upload them, they still appear duplicates select count(*) from tab...
asked by 05.01.2018 / 21:07
1
answer

How to save in Geometry data type SQL Server from Visual Studio?

Good morning ... I have a defined table (SQL Server 2012) as well; CREATE TABLE cliente( id [int] IDENTITY(1,1) NOT NULL, codigo [varchar](10) NOT NULL, nombre [varchar](100) NOT NULL, apellidos [varchar](100) NOT NULL, direccion [varchar...
asked by 09.08.2017 / 04:02
2
answers

How to get all the records of a table with maximum date?

I have two tables of which I have repeated values and what I want to obtain is the all value with maximum date of each table and that they do not repeat themselves and I do not know how to perform. I have two tables one of them is A which has...
asked by 06.11.2018 / 16:02
2
answers

Replace the value of NULL with a fixed value in a Join SQL Server

I'm joining two tables in SQL using a LEFT OUTER JOIN. This is my query: SELECT V_InvoiceHeader.IDFactura, V_InvoiceHeader.FechaDocumento, V_InvoiceHeader.NombreCliente, V_InvoiceHeader.NIT, V_InvoiceHeader.DireccionFacturacion, V_In...
asked by 30.11.2018 / 18:36
3
answers

get the last insert entered sql

I have a database sql server 2012, where I have a table that contains a datetime field, and what I need is to get the last insert that was made, I have the following table and I hope you can help me --------------------------------------------...
asked by 09.12.2016 / 23:00
1
answer

Sample Date Different format SQL Server

Hello I have a Table that has a Date column, this has three date formats (04/10/2018) (2018-10-04) (20181004), what I would like to do is in a query to be able to match the format of three. Thanks     
asked by 04.10.2018 / 15:51
1
answer

Update field of two sql server tables

I present the following concern, I need to make an update of the initial amount in the article table, brought from the table articulo18abril as a condition I have established that if they have the same id is assigned the amount that corresponds...
asked by 19.04.2018 / 23:17
2
answers

There is already an object named ##Temporal Table in the database

I have the following stored procedure, which allows to generate a report in Excel. The fact is that when several users are generating the report, a series of errors appear indicating that there is already an object called ##rpttabla in th...
asked by 22.09.2017 / 01:09
1
answer

how can I concatenate records from the same column in sql server?

If you could help me, I have a table like this: identificativo fecha 72028586 11/05/2018 72028586 13/05/2018 72045976 17/05/2018 72063798 13/05/2018 and I need to make a query to show me th...
asked by 21.05.2018 / 18:07