Questions tagged as 'sql-server'

1
answer

Add characters to a string in sql

I have a very simple string like the following    'kyo, 1, koko, yuyu' then I would like to add single quotes to each word to get something like    '' kyo ',' 1 ',' koko ',' yuyu '' Even if possible I would like to respect the whol...
asked by 13.09.2018 / 01:47
3
answers

Load data GridControl DevExpress using a DataTable

I'm using Windows Forms , GridControl DevExpress , SQL Server 2008 . I try to load a GridControl data using a DataTable . The code is as follows: var dtDatos = GetAll("SELECT EmployeeID, FirstName, LastName, Address FROM Employees");...
asked by 08.11.2016 / 00:03
2
answers

Create Stored Procedure to fill a table

I have a mobile application that calls different services that I have in c# with Wcf . The issue is that I have one of those services in which the user from the mobile sends an object called Medicion . This object has a list o...
asked by 09.11.2016 / 23:33
1
answer

Priority to Order by instead of Where

Good morning to all, this question has the purpose of finding how I can generate an indicator of existence when the record is repeated: because the application has been previously generated, then I show the related query: SELECT id AS Existe F...
asked by 26.04.2018 / 18:56
1
answer

SQL Numbers Rounded Decimals

In SQL for giving an example in some fields I get data like "300.38383" for giving an example and I only need the first 2 decimal places after the round point    What functions are there so that only the first 2 rounded decimals are thrown...
asked by 04.07.2018 / 04:54
2
answers

Assign a IS NOT NULL condition to a Variable?

Friends I have a query as follows WHERE bt.ProductoID= CASE WHEN @ProductoID IS NOT NULL THEN @ProductoID ELSE IS NOT NULL END AND (bt.talla= @talla AND bt.Año =@Año) The problem that I have is that I have to do a search procedure,...
asked by 27.06.2018 / 03:19
2
answers

Make JPA name the tables in capital letters

I am using JPA with spring boot, hibernate and sql server, it works fine, but I would like the names of the tables and their fields in the database to write them in lowercase, how can I make it uppercase? This is how I have my properties:...
asked by 23.08.2018 / 19:29
1
answer

Trigger SQL Server insert record and update a field from another table

I have two tables:    tblProducts -Id int, -Producto varchar(10), -Cantidad int    tblVentas -Idventa -Idproducto -Cantidad int The tblProductos table is related to tblVentas. What I want to realize is that when the sale...
asked by 14.03.2018 / 07:14
3
answers

Query as of the current system date

How to consult from the current system date without having to specify the following fechaEntrada BETWEEN CONVERT(DATETIME, '2017-11-01 00:00:00',121) and CONVERT(DATETIME,'2017-11-01 23:59:59',121 The query: select c...
asked by 23.12.2017 / 00:00
1
answer

Get connection string SqlServer 2008 WITHOUT Visual Studio

I have a VPS with Windows Server 2012 and with SqlServer already installed. And I developed a Website with a BDD connection on my local PC. The connection string that I use, I generated it with Visual Studio when connecting a table from the same...
asked by 18.12.2017 / 12:37