Questions tagged as 'sql-server'

5
answers

How to get the total character size of an SQL column?

I want to get the total length of characters that a column supports, eg INT supports 10 characters. I tried to use DATALENGTH that does not return the number of characters , but the amount of bytes that the column occupies....
asked by 10.04.2014 / 20:39
2
answers

How do I create a trigger that fires whenever I have an insert event in the table?

I need to create a trigger that fires whenever I have an insert event in the table, before it is inserted, it checks a condition, if the condition is respected it changes the value of a certain field that is being inserted. Example: -- id...
asked by 04.04.2014 / 15:53
1
answer

How to change the language of Microsoft SQL Server Management Studio?

The Microsoft SQL Server 2014 Enterprise .ISO image file that is available for download through Microsoft DreamSpark exists only in the en-US version. Would you just like to change the language of the Management Studio interface? I have tried...
asked by 28.04.2014 / 13:44
3
answers

how to do update with column with single quotes sqlserver

I need to update in a column that has a lot of single quotation marks in the field, it has been inserted content with ckeditor so it has several tags like <span style="FONT-SIZE: 12pt; FONT-FAMILY: &quot;Times New Roman&quot;,&q...
asked by 04.11.2015 / 02:59
1
answer

SQL injection with PHP + SQLServer [duplicate]

How can I prevent SQL injection coming from an input via POST using PHP + SQLServer. (Using Microsoft SQL Server => mmsql) I am doing the data abstraction of a DB that runs MYSQLI and in this case it is done this way. $Email= mysqli_real...
asked by 15.01.2016 / 20:49
5
answers

How to pass a list of values to a Stored Procedure?

I am creating a stored procedure in SQL Server 2008 R2 and would like to pass a list of values by parameter, for example: Table produto ---------------- | id | nome | | 1 | maçã | | 2 | pera | | 3 | uva | Stored Pr...
asked by 03.01.2015 / 14:10
2
answers

Place data from a row in columns

SELECT datacc, horacc FROM R070ACC WITH (NOLOCK) WHERE numcad = '2676' AND DATACC between ('2018-16-04') and ('2018-15-05') and oriacc = 'E' In the first column appears the day of the month repeated 4x, with different records in the sec...
asked by 16.06.2018 / 17:27
1
answer

Retrieve information about which Tables / Procedures / Views are most accessed in SQL SERVER

select db_name(database_id) as banco, object_name(object_id) as objeto, stats.user_seeks, stats.user_scans, stats.user_lookups, stats.user_updates from sys.dm_db_index_usage_stats as stats I have this SELECT whi...
asked by 13.01.2015 / 13:58
3
answers

How to export records in SQL without duplicates?

I'm trying to remove some duplicate records from a table and I searched the Internet how to do this, and found something about distinct . My scenario is: I have a table that has a record with all duplicate columns. ID | Nome | I...
asked by 19.11.2014 / 19:28
1
answer

Isolated Storage or SQL Server Compact

I'm making Windows Phone 8.1 something similar to a dictionary where there will be a lot of text with sorting, searching, sorting by name. Keeping in mind that there will be this large amount of information, what would be best to use Isolated...
asked by 28.08.2014 / 00:18