Questions tagged as 'sql-server'

1
answer

How to use FreeTDS with MAMP on Mac OS?

I need to use the PHP mssql methods and I always did this using FreeTDS in the native Apache MAC OS >. What happens is that shortly after upgrading to OS X 10.9 (Mavericks) I started to use the MAMP package and not the native Apache...
asked by 17.12.2013 / 14:17
3
answers

List all triggers in SQL Server

Is there a command that lists all triggers of a database in SQL Server?     
asked by 01.09.2016 / 20:11
5
answers

How do I know if a column exists in a SQL Server table?

I'm trying to add a new column to a SQL Server table, and I want to know if it already exists or not. I have tried something like this: IF EXISTS( SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'minhaTabela'...
asked by 02.02.2014 / 01:05
5
answers

How to get the name of day of the week of the first day of the month?

How do I get the name (Monday, Tuesday, Wednesday ...) from the first day of December from the current date?     
asked by 17.10.2017 / 15:47
3
answers

How to condition the insertion of a record in SQL Server?

How can I condition the insertion of a record into a table in SQL Server using the T-SQL language considering the following rules: If the record to be inserted already exists in the table, only update the field referring to the record modifi...
asked by 12.12.2013 / 17:15
4
answers

How to replace column text in SQL Server (tsql)?

I have a text column in SQL Server 2008 R2, which is populated with wrong typed text in thousands of records. I would like to make a UPDATE replacing the wrong text with the correct one.     
asked by 10.02.2014 / 16:49
3
answers

Competition control in database insertion

I have a concurrency control problem when inserting data from a table. The scenario is as follows: There is a table that records daily data according to the user request, and this data can not be duplicated. The current concurrency control ch...
asked by 12.09.2014 / 15:39
1
answer

Comparison: CTE vs CURSOR

I do not know if this will be a question that many pose, but I have always had it in mind almost always. Normally when I need to deliver a corrective script to a client, used to only run once, I use a CURSOR , perhaps because it is mo...
asked by 24.12.2018 / 12:39
2
answers

Connect Arduino to SQL Server

I'm wanting to keep a database up to date with the Arduino sensor outputs. I would like to know if it is possible to directly connect Arduino to SQL Server for sending and receiving data. Or would the only option be to make an intermediate ap...
asked by 08.05.2015 / 16:01
3
answers

Select first record within a segmentation in SQL Server

I have the following example table: The query asks me to show which students entered first in each course. I can tell which student entered the university first, using the top(1) function, but how can I do this for each course?...
asked by 29.08.2017 / 16:48