Questions tagged as 'sql-server'

1
answer

Error executing the DBCC SHRINKFILE command in the Log File of a SQL Server database

The following sql code for the compaction of the log: use My_dabase go declare @arch_log sysname set @arch_log =(select name FROM SYSFILES where fileid = '2') select name from sysfiles ALTER DATABASE My_database SET RECOVE...
asked by 17.01.2018 / 23:26
0
answers

Text field as400 are seen as varbinary in SQL SERVER

I have an AS400 Server (IBM i) for Linked Server to SQL, the problem is that some values (text type (varchar)) are not displayed correctly, something like this is seen in the result of the query by OpenQuery 0xD4C5C4C9C140404040404040404040...
asked by 22.12.2017 / 17:54
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

Substitute of% ROWTYPE in SQL Server

Hi, I would like to know if there is a substitute for the% ROWTYPE statement in SQL SERVER I would like to create something like that but I can not find how to do it PROCEDURE mostrar(pdni IN VARCHAR2) is tupla poblacion_tv%ROWTYPE; BEGIN...
asked by 05.01.2018 / 21:11
0
answers

SQL compatibility level and azure

It turns out that in azure I have a Database that I want to back up on my local computer, and I want to generate a .bacpac file, but it gives me the following error. already try ALTER DATABASE name_db SET COMPATIBILITY_LEVEL = 130 GO hel...
asked by 03.01.2018 / 03:43
1
answer

How to configure DbContext for the name of tables in the singular?

I am starting to work with MVC 5 and Entity Framework 6, I clarify in advance that in my project I am not using visual studio assistants for EF since I want to understand in depth how it works. Well, my problem comes when reading a table from my...
asked by 21.01.2018 / 19:16
1
answer

Problem when evaluating if a point belongs to a polygon using the GEOMETRY data type - SQL SERVER 2014

Good morning, I am setting up a procedure in T-SQL to detect if a point belongs to a polygon in the following way: By putting an exact point that is in the polygon, the STContains method should return a 1 (Belongs) and is returning a...
asked by 07.12.2017 / 13:31
1
answer

Delete line null file created CMD

I have a batch which takes the name of the file and path of a parameter in a table and then executes a select and saves it in a txt. The problem that is occurring is that in the last line I create a record with NULL (I am going to attach an imag...
asked by 24.11.2017 / 18:37
1
answer

Query about time range in SQL Server? [closed]

Good day, I have to make a query about the generation of alarms, I want to know how many seconds it remains active (Column: EventTime) every period of power on and off (Column: Message), of the time that passes in that time I want to gener...
asked by 10.10.2017 / 22:37
0
answers

Connection to SQL Server from R [closed]

I'm trying to make a connection to a database in SQL Server from R , I have the server 172.16.XXX.XXX , the name of the database "pnet" , user: "usrname" , pwd: "pwd" . I'm using the RODBC library, here's my...
asked by 12.10.2017 / 22:41