Calculate the median - What is the fastest way to calculate the median
Security roles - All, Firstly I'm not necessarily asking for a complete answer. I'm happy to be pointed in the right direction to solve...
table relationship - How do you determine table relationship ie 1:1, 1:many, many:many?
sp_OAGetProperty always returns a NULL - I found the following code online and was trying to run it but I am not getting back the XML....
Baffling results - I have two stored procedures that are functionally identical. I won't bother to post them as the queries themselves are...
Alternate Query for better performance - Hi, I have two massive tables, Order Header and Order details, I need to join these two tables. I need to...
Query runs slow when executing under the context of a different DB - I am trying to understand this behavior but when I try to use the below code and execute it in...
sql job taking more time - Hi All, Need some advice on troubleshooting sql jobs. We have a ongoing performance issue on one of our Production server. ...
how to set value of variable = variable + string - In subject line of email I want @Subject to return "'Submission at 10/03/2019 22:46:34". Concatenating with + and quotes isn't working....
Select latest and 2nd latest date rows per user - I have the following query to select rows where the LAST_UPDATE_DATE field is getting records that have a date value...
sent SQL query as formatted Excel .xlsx via email - I already have a working stored procedure that exports sql query data set into a .csv file and emails it. Works great. Now I...
why did WHERE EXISTS delete the contents of whole table? - the inner query returns only 36 rows, so I expected the DELETE WHERE EXISTS to delete only 36 rows. But...
The transaction log for database is full due to 'CHECKPOINT' Error: 9002 - Hi to all, I'm puzzled ! Running a database on an older server stoped executing its jobs all of a sudden. Digging into...
Does the Order of Tables in the Join clauses of the Update Statement Matter - Suppose I have 3 tables as seen below: I would like to update the Name column of the Manufacturer Table based...
Subset rows with opening and closing balance - Hello All, I trying to get result as mentioned below (excel format for illustration purpose only). I try using my script and...
How to round a value in a varchar column ? - Dear Forum, I have a strange requirement to round a value in a varchar column in MS SQL*Server 2012. I know...
nvarchar to smalldatetime - Im currently working on updating company database in which on one of the tables the 'CreateDt' is in the nvarchar...
Query a dynamic date range based off current month - I’m trying to determine which month I’m in so I can setup aSSIS package to auto run and drop off...
SSAS users randomly losing connection - Hi all We've got 5 multidimensional cubes and access is granted by AD groups. There is one role per cube with a...
Getting SID from Active Directory - SID transformation problems - Hi all, here is the issue: we had an old xp that gets SID from AD, using a domain user name (i.e....