Questions tagged as 'sql-server-2012'

1
answer

Update data in sql

I have the following code, I would like to know how to modify it to make an update to the data that I consult from the id_rol_tercero table, the table I want to update is called rol_por_tercero, use NameDatabase SELECT rol_por_tercero.id...
asked by 26.01.2018 / 15:13
1
answer

Doubt with servlets of java and sql [closed]

In this small servlet I am entering the values in hard and I would like the hard values to have parameters so that the information can be stored since it would be on the client's side where this information is entered. protected void doGet(Htt...
asked by 16.08.2017 / 00:27
1
answer

Join two SQL tables that do not have a foreign key

What kind of friends, I'm helping in a project in Laravel with a SQL database quite badly done, anyway ... I have Table1 with a field called Code and Table2 with the field called Code, the problem is that I must join the tables using the Code...
asked by 06.09.2017 / 21:38
1
answer

SQL INSERT SELECT ordered

I have created a temporary table @TablaTurno , which I insert data in the following way: insert @TablaTurno select ROW_NUMBER() OVER(ORDER BY tturno)+@idturno as IDTurno,mci.IDCaja as IDCaja,@idestado as IDEstado,@idlocal as IDLocal,......
asked by 03.01.2017 / 17:25
0
answers

FORMAT function used for numerical data does not work in sqlserver before 2012, alternatives

I'm using the format function to format a number, example: select format(45.123,'###############.00') print 45.12 select format(45.123,'###############.0') print 45.1 There is some way to do this in the previous versions of sq...
asked by 04.01.2019 / 21:33
0
answers

Validate client ID to export in SQL Server

Friends, good evening, I hope I can explain myself well about the problem I'm having. I am currently doing an export in SQL With the following query: SELECT IDFactura, FechaDocumento, NombreCliente, NIT, DireccionFacturacion, FOLIO, Sub...
asked by 29.11.2018 / 04:59
0
answers

SQL Server Linked Server

I have the following error when trying from linkear server to another SQL Server . TITLE: Microsoft SQL Server Management Studio ------------------------------ The linked server has been created but failed a connection test. Do yo...
asked by 26.11.2018 / 17:13
1
answer

Connection php to SQL Server 2012 database from Linux

Good morning, I would like to request your collaboration and knowledge with a problem that has taken me several days and from which I could not get out, I am developing an application with php but I need to connect to a MS SQL SEVER database...
asked by 08.11.2018 / 15:20
0
answers

Get the maximum value of a DATALENGTH from the fields in a record

What I am looking for is how to get the maximum value of the DATALENGTH function from the fields in each record of a table. For example: |No|Nombre y apellidos|Edad|Direccion|MaxLenCamp| |1 |Juan Perez Garcia | 23 |Calle San Martin Puntual |25...
asked by 04.11.2018 / 00:55
0
answers

Before Update Trigger SQL SERVER 2012

alter TRIGGER AsignacionHorasDocente_TRG on tbdocentes after UPDATE as BEGIN DECLARE @nhoraCurso INT = (select sum(hor_curso) from tbcursos where id_categoria=1); DECLARE @nhoraDocente INT = (select sum(hdi_docente) from tbDocentes where id_c...
asked by 01.11.2018 / 08:32