Questions tagged as 'sql-server'

3
answers

How to convert varchar to datetime in SQL Server?

Good day to all, I want to convert this data 14 de Febrero 1986 in sql to datetime , but%% of% CONVERT(datetime,fecha_nacimiento) It does not convert it. Is there any way to convert it?     
asked by 02.05.2018 / 16:43
2
answers

Extract date within a SQL SERVER text string

I have the following string: Un texto cualquiera 22/12/2016 fin texto I'm trying to get the position of 22/12/2016 with the PATINDEX function: SELECT PATINDEX('__/__/____', 'Un texto cualquiera 22/12/2016 fin texto');...
asked by 03.10.2016 / 18:54
2
answers

Queries with hours in SQL Server?

I have a question about how I can make queries in SQL Server with hours fields. I have a column called hora_inicio_prestamo and another hora_fin_prestamo , both of type time(0) , I also have a column called Estado_presta...
asked by 07.04.2017 / 03:05
2
answers

SQL 60,000 records in less than 3 minutes

Today I have an optimization question, my boss wants me to save 60,000 records in the shortest possible time. For this I have made a query that takes information from a .csv file and I put it on a temporary basis, from which I make a small fil...
asked by 23.08.2018 / 19:38
2
answers

Remove duplicates ... under certain guidelines

I have a table Peticiones whose design is: NPeticion - nvarchar FechaApertura - date TipoPeticion - nvarchar FechaResolucion - nvarchar ... (más campos, irrelevantes para este asunto) The question is that I try to make a q...
asked by 12.04.2017 / 13:12
4
answers

Insert data in SQL Server without being installed on my computer

I want to know if there is any way to insert data in a database that is in SQL Server without having any of the versions of this installed or have Visual Studio installed e my team. These are the data I have: server = tcp: "Link to...
asked by 23.02.2017 / 18:01
1
answer

UPDATE from a SELECT using SQL Server

In SQL Server, it is possible to make a INSERT INTO to a table using a SELECT : INSERT INTO tabla (col, col2, col3) SELECT col, col2, col3 FROM otra_tabla WHERE sql = 'ok' Is this also possible for a UPDATE ? I have a...
asked by 09.02.2017 / 17:21
2
answers

Is there a "time" type that represents such that HH: mm in SQL?

I am a SQL beginner and I am creating a table, my doubt is that I have defined my start time and end time as VARCHAR2 to enter a time, which correspond to some classes (of a gym), that it would be more correct to create it with some type time...
asked by 11.08.2016 / 12:34
0
answers

Procedure stored in laravel with parameter

I have seen two syntaxes when calling stored procedures that receive parameters in laravel, both work perfectly: //Concatenando parametro DB::select('exec Miprocedimiento "'.$parametro.'"'); //Utilizando ? DB::select('exec Miprocedimiento...
asked by 11.04.2018 / 17:17
1
answer

Problem consult self-referenced table

I want to be able to put together my dynamic menu with the following data structure: The menu is restricted by user roles. To my table menu, I have added a column id_menu_padre to be able to build the structure type "tree" that my menu sho...
asked by 03.09.2018 / 18:13