Questions tagged as 'sql-server'

1
answer

Detect Variable error in SQL server 2008 R2

Well I have the following Insert: INSERT INTO [PS_GameData].[dbo].[Chars] ([ServerID], [UserID], [UserUID], [CharName], [New], [Del], [Slot], [Family], [Grow], [Hair], [Face], [Size], [Job], [Sex], [Level], [StatPoint], [SkillPoint], [Str],...
asked by 04.08.2018 / 18:30
1
answer

How to do ALTER TABLE in SQL Server 2008 R2 to add IDENTITY (1,1)? [closed]

How do I add IDENTITY (1,1) to Table Query # 1 , in the UserUID column? > whose Table has pre-existing UserUID records without having to corrupt (Re-create the table) or delete the data from the pre-existing UserUID column? IMPORTAN...
asked by 21.07.2018 / 02:14
1
answer

The best way to endorse a table by periods [closed]

I have a table ( tabla_1 ) that is constantly edited with certain values and I want to be able to keep a searchable record of these same data of their state in periods of time gone by. I am considering creating a second table ( tabla...
asked by 06.07.2018 / 22:31
1
answer

Is it possible to make this query in linq?

SELECT CL.ClNIt, CL.ClNombresApe, VS.VsFeha, VS.VsValorNeto, VS.VsValorVisita,SUM(CC.CcValor) AS SumCupos, CL.ClSaldoCupo FROM Visitas VS INNER JOIN Clientes CL ON VS.ClNit = CL.ClNIt INNER JOIN CuposCliente CC ON CL.ClNIt = CC.CcClNit WHERE CL...
asked by 31.07.2018 / 03:10
1
answer

select SQL fields after a certain date

I have a table that has daily records (test table) for 2 years I want to get the result from a certain generated by php date "$ last_periodo_date" $last_periodo_date = date("Y-m", strtotime("- 1 month"))."-25" ; $ last_periodo_date alw...
asked by 30.07.2018 / 17:59
1
answer

Modify query to enter a data to a table. SQL server

I have the following query: SELECT A.CardName FROM OCRD A INNER JOIN OSLP B ON A.SlpCode = B.SlpCode WHERE B.SlpCode = 1 AND LicTradNum = 'XAXX010101000' It generates a list of customers corresponding to the seller with ID (SlpCode is th...
asked by 05.07.2018 / 13:13
2
answers

import .txt to sql server

Good morning. I need to import a large amount of information into a table in a flat file .txt and the information is separated by | . Using the statement bulk..insert..with..etc ; it was not possible to import, because the da...
asked by 09.07.2018 / 18:09
2
answers

query sql that counts how many days of each month there are two dates grouped by months

I come to you because I have searched and I have not found anything that can help me with the problem I have. I must show in a query in SQL Server how many days of each month there are between two dates but grouped by months (I have an Initial d...
asked by 04.01.2018 / 13:22
1
answer

Open pdf / doc stored on sql server using asp.net and entityframework

I have a web application in which I am saving files of type pdf or doc in the database in a table with a parameter of type "varbinary", I know that it is not ideal to save such files in the database but I need to know how I can see that file fro...
asked by 21.06.2018 / 20:10
1
answer

Subtract 2 dates where one is saved as text

I wish to obtain the total sum of the days from the date of period 25-06-2018. My problem is that the period date can not be modified and added by a third part of a form and the format is: Tabla periodo id periodo1 id 1 d...
asked by 27.07.2018 / 19:39