Questions tagged as 'sql-server'

1
answer

Oracle REGEXP_SUBSTR to SQL Server?

I want to convert the following to MS SQL Server : REGEXP_SUBSTR(m.DESCRIPTION,'CATEGORY=([^,]*)(,|\Z)',1,1,'c',1)     
asked by 17.10.2016 / 19:15
1
answer

Error in query when creating tables with foreign keys in SQL Server

I am executing a query with C # and I get the following error .. This is the query that I'm executing, something fails, I do not know why, it still is not good sql ... CREATE TABLE Empresa( id_empresa int IDENTITY(1,1) NOT NULL...
asked by 21.03.2017 / 17:31
2
answers

Connect PHP with SQLServer

Good morning I have a question, since I have a database in SQL SERVER 2014 and I am trying to establish a connection from PHP I already checked it and according to me my error is sending the IP address of the database server but I do...
asked by 21.03.2017 / 16:16
1
answer

How to capture the Primary Key Duplicated error in Android (java) with SQLServer?

Is it possible to know that the error that occurs when inserting a record is due to a duplicate key error? I have a user registry in which the user is the primary key and I have it in try catch but when the user already exists it jumps to...
asked by 28.11.2018 / 15:51
1
answer

How to show the date and time stored in SQL?

I have a small problem, maybe it's the simplest I have a query which shows me date and time that is already stored in BD, but always shows me the same time in all 2018-10-05 12: 46: 03,000 the time if the query is saved well is as follows: p...
asked by 30.11.2018 / 16:57
1
answer

How do I add data from a table column in C # and SQL Server with Entity framework?

I'm working with c # in visual studio and entity framework, I'm a novice in this. What I need is to add a column of a sql server table. I had thought about creating a list with all those numbers and then adding them. But I do not know how to do...
asked by 09.12.2018 / 02:56
1
answer

How to save the checks from a checkbox to the database?

I developed an application in WPF with C #. I have a window that contains a Combobox where the Items are composed of Checkbox with a foreach result of a table. My question is: How do I keep in the database with LINQ, the checkbox check that are...
asked by 12.12.2018 / 18:55
1
answer

Error Intentun Savechanges () Entity Framework 6 ASP.Net MVC5?

When I update my gender object, it brings the date of creation with the following data, which should not because it has a value assigned in the database, I get the following date: The error that shows me when I try to do the savechan...
asked by 31.12.2018 / 14:57
1
answer

Avoid duplicate values C #

Good I would like to ask you a question, how can I do to verify that the value written in a textbox is not repeated in the table of the database this would be a portion of the code that is in the presentation layer before being Sent to the metho...
asked by 14.11.2018 / 23:37
1
answer

Convert float type variable to decimal in Sql Server

I have the following code: DECLARE @A FLOAT SET @A = 26069175.1934196 SELECT @A SELECT CAST (@A AS DECIMAL(6,2)) The result I'm looking for is: 26069.19 Which are the first 6 integers from left to right and 2 decimals in the same way....
asked by 06.11.2018 / 18:25