tsql
Insert or Update rows Via XML in SQL Server (Bulk)
Hi I Can not seem to wrap my head around how to parse an Xml document and the decide if it needs inserting or updating.[详细]
2023-04-11 09:22 分类:问答Moving data between fields in destination table in T-SQL MERGE
I have a SQL MERGE statement that does an UPDATE if a value exists (and an INSERT if it does). I\'d like to record the last few \"historical\" values in the row when an UPDATE happens, sort of like th[详细]
2023-04-11 07:46 分类:问答Using a custom aggregate function in a GROUP BY?
I have a simple MEDIAN calculation function: IF OBJECT_ID(N\'COMPUTEMEDIAN\', N\'FN\') IS NOT NULL DROP FUNCTION dbo.COMPUTEMEDIAN;[详细]
2023-04-11 07:25 分类:问答How can I convert the division of two integer values to a decimal using T-SQL against a iSeries AS/400 Database?
Assuming the follo开发者_如何学Cwing query: SELECT ID, COUNT(1) AS NumRecords, SUM(Quantity) AS TotalQty[详细]
2023-04-11 07:15 分类:问答speed up SQL Query
I have a query which is taking some serious time to execute on anything older than the past, say, hours worth of data.This is going to create a view which will be used for datamining, so the expectati[详细]
2023-04-11 07:09 分类:问答What is the difference between being a db_owner and having GRANT ALL?
I have been using the following SQL to create a user, login and database. USE master; GO CREATE DATABASE TEST;[详细]
2023-04-11 06:35 分类:问答Regular Expression to Match All Comments in a T-SQL Script
I need a Regular Expression to capture ALL comments in a block of T-SQL.The Expression will need to work with the .Net Regex Class.[详细]
2023-04-11 06:30 分类:问答How to add a join based on parameter passed in stored procedure
Can I add a inner join or left join or right join based on parameter value. The only way right now I have is writing a dynamic query like[详细]
2023-04-11 05:23 分类:问答Query the contents of stored procedures on SQL Server
I am exploring a legacy database system and have very little knowledge of its internals. I would like to find all the stored procedures that invoke another stored proce开发者_开发技巧dure A.[详细]
2023-04-11 04:55 分类:问答How should I process progressive status codes in a database?
I\'m working on a project for an academic institution and I need advice on the best way to approach this problem. It\'s been a long time since I did any traditional application development (close to f[详细]
2023-04-11 04:14 分类:问答