Questions tagged as 'tsql'

5
answers

MySQL Limit Equivalent in SQL Server

Does anyone know how to relate the differences between MySQL and SQL Server, including using LIMIT n,n ? Or if they have a link that lists the differences would be cool. Example SELECT * FROM tabela LIMIT 50, 100 What would be the...
asked by 26.03.2014 / 17:01
1
answer

What is the difference between ISNULL and COALESCE in a search?

I'm not sure how to use ISNULL and COALESCE . Currently when I create a query in SQL Server, I have doubts about ISNULL and COALESCE , I did some research and I was able to discover the difference of both. Only tha...
asked by 25.03.2015 / 15:56
1
answer

How to use a specific index in a query in SQL Server?

I have a non-normalized table in SQL Server installed on my PC which is fed monthly by Integration Services (SSIS) from a report into an Excel worksheet. That is, I am keeping track of a certain report. This table has several key fields. Depe...
asked by 17.12.2013 / 13:24
2
answers

How can I query for the heaviest queries in SQL Server?

In the SQL Server database, how do you know which queries have consumed most of the database resources at runtime?     
asked by 12.12.2013 / 17:31
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

How do I get the last date of a weekday in a given month in SQL Server?

Using the SQL Server T-SQL language, how to get, for example, the last Wednesday of the month of May in a given year?     
asked by 13.12.2013 / 17:45
2
answers

How to construct a complete XML in T-SQL?

I'm working on a procedure that returns a field in XML, so far nothing bad. The problem arises when I have initial data coming from a query and intermediate data coming from another query. I tried to solve with string concatenation and then c...
asked by 28.02.2014 / 16:40
1
answer

What is a T-SQL query?

In the Stack Exchange Data Explorer , specifically in the first line says:    Click the Compose Query button up and start typing your T-SQL query [...] What a free translation would be:    Click the Query button above and start ty...
asked by 04.10.2017 / 16:01
1
answer

What is the difference between TRUNCATE and DELETE + CHECKIDENT?

Both perform the same action (delete + zero the PK value), but in performance what is the difference between them? Example: When you have more records it is recommended to use what form? TRUNCATE : TRUNCATE TABLE Exemplo DELETE +...
asked by 24.07.2014 / 17:28