Most voted "cte" questions
CTE - Common Table Expression
Learn more…7 questions
Sort by count of
-
10
votes1
answer272
viewsComparison: CTE vs CURSOR
I do not know if this is a question that many ask, but I have always had it in mind almost always. Usually, when I need to deliver a script corrective to a customer, used only to be executed once, I…
-
4
votes1
answer85
viewsDoes using CTE (Common Table Expression) create a type of "cache" in the database?
I have an appointment with several JOIN and queries, and when executed, it takes about 7 seconds to return. Getting the same result, using CTE’s, the query takes around 8 seconds of the first…
-
2
votes1
answer162
viewsSELECT Recursive (SQL)
Good afternoon! Guys I’m having the following difficulty: Imagine that I have a list of several Customers, and each customer has a Rating Group ( the Rating Group can be repeated for some…
-
0
votes1
answer37
viewsCTE: Union of two tables in which one of them has only one field in common
I need to do the following using a CTE.Imagining two tables with columns: Articles: Reference, Quantity, Price Associated References: Reference, Referral I intend that if there is an associated…
-
0
votes1
answer51
viewsConcatenate values with condition (case)
Good evening! I’m new to the programming. I have the code below in a CTE that counts the number of subscribers in each area. In the main consultation I see which area has the largest amount of…
-
0
votes1
answer58
views -
-2
votes1
answer120
viewsSubconsulta returns more than one value
Good night! I have an sql query based on a CTE and I want to take the largest value between a subconsulta, but when I run the main query the subconsulta error returns more than one value appears.…