Most voted "tsql" questions
T-SQL (Transact Structured Query Language) is the extension of the SQL functionality supported by the Sybase ASE and Microsoft SQL Server databases. There are differences between language versions, so questions about T-SQL should be marked appropriately with tag [sql-server] or [Sybase], and include the version as well.
Learn more…107 questions
Sort by count of
-
0
votes1
answer65
viewsCursor search: the number of variables declared in the INTO list must match the number of columns selected
Hello! I made a T-SQL and at the moment execute is giving the message: Message 16924, Level 16, State 1, Line 58 Cursor search: the number of variables declared in the INTO list must match the…
-
-1
votes1
answer708
viewsHow to know how many sales for each month?
I need to set up a query that brings the total sales of each month from a table called sales.SalesOrderHeader, but I’m not getting it. In this table there is a field OrderDate which is the date of…
-
-1
votes2
answers4491
viewsQuery Search Specific Word in a Field - SQL Server
Is there a function that I can only find the data of a field ? I’m only trying to get from Expiration until 2019, I have several lines with this validity information, and they don’t appear in the…
-
-1
votes1
answer25
viewsoperation with date and deadlines SQL_SERVER
I have a table in the comic book that has a column called term. in that column I have the deadline information in months ex.: 10, 6, 12, 14.... i would need to calculate to know the final date of…
-
-1
votes1
answer48
viewsWhy can’t I group data into that query?
SELECT e.idproduto codigo, p.descricaoproduto nome, sum(e.qtde) entrada, sum(s.qtde) saida FROM itementrada e INNER JOIN produto p ON e.idproduto = p.idproduto INNER JOIN itemsaida s ON p.idproduto…
-
-2
votes0
answers13
viewsSQL Msg 2627, Level 14, State 1 Cannot Insert Duplicate key in Object
Hello I’m new still need to migrate some students to another table but gives the error of uplikey Dcate someone can help ? INSERT INTO [base_order_corp].[dbo].LY_HISTMATRICULA(ALUNO, ordem, ano,…
-
-3
votes1
answer57
viewsDATE CRITERIA ENTER A SUBQUERY - SQL
I am doing a query that the boundary dates are based on subquerys, I would like to put a condition so that the boundary column is between data1 and data2 follows the query: SELECT PSECAO.CODIGO…