common-table-expression
C# - SQL WITH clause
Just fishing for ideas- I have a SQL statement that I need to parse in C#. It is formatted basically as follows -[详细]
2023-04-02 14:44 分类:问答Query that returns records on total sum of quantity less or equal to some value
DECLARE @TotalMaxQty int SET @TotalMaxQty = 1000 SELECT PKId ,Qty FROM dbo.Sales PKIdQty _________ 1100 2200 3750[详细]
2023-04-01 14:56 分类:问答SQL: Use table aliases across multiple select statements
How can I use an alias across different select statements or across a compound select statement? I want to do something like[详细]
2023-03-31 00:52 分类:问答Recursive CTE to find parent records
first i must admit that i\'m not very familiar with sql server\'s recursive CTE\'s but i think this is the best approach.[详细]
2023-03-30 19:31 分类:问答How to return text for default language
I have so tables: and so data at Language table: and so data at Text table: I have to return text for requested language if it exists and text for default l开发者_JS百科anguage if it does not e[详细]
2023-03-29 06:08 分类:问答Including a set of rows in a view column
Design: A main table where each entry in it can have zero of more of a set of options “checked”. It seems to me that it would be easier to maintain (adding/removing options) if the options were part[详细]
2023-03-28 15:02 分类:问答Temporary table storage performance comparison
Can anyone break it down in plain English the performance difference between using temp tables vs. CTE\'s vs. table variables in MSSQL. I have used temporary tables quite frequently and have started u[详细]
2023-03-28 12:32 分类:问答Sql Server iterative select/update
I have table with storage. There is 20 columns for \"amount\" which can be zero or greater (can not be null).[详细]
2023-03-28 06:51 分类:问答Possible recursive CTE query using date ranges
Not sure how to even phrase the title on this one! I have the following data: IF OBJECT_ID (\'tempdb..#data\') IS NOT NULL DROP TABLE #data[详细]
2023-03-27 06:50 分类:问答CTE, recursive search in 2 different tables
i have 2 queries go gather data from different tables, both recursive, but closely related. Both work well:[详细]
2023-03-26 16:21 分类:问答