Select query inside procedure taking long time, clustered indexes doing scans, need suggestion - I have a procedure, which is running very slow, and is being timed out without returning any records. [Reports] Table...
How many megabytes is 128 GB? - I'm about to max out the RAM allocation on a Standard Edition of SQL Server for the first time in...
SQL comma separated values and a loop - Hi I have 2 tables. A jobs Table and a Drops Table. In the Jobs table we have a collection...
Stored Procedure to transfer all DB objects including data from one schema to another schema - hi, Stored Procedure to transfer all DB objects including data from one schema to another schema this is the code i tried...
Deny DML on a table - Hi all I have a table "test" in my "testdb" database. There is a user "user1" The user has access to...
Script to replace "," - How to create a loop to go through all fields, all cells to replace "," with " " (space)? For example, there are 70...
Database design - Hi, I am having an transaction database in SQL 2012 which is under UAT, Initially there use to 10-15 insert in...
t-sql 2012 possible join to same table - In a t-sql 2012 column I have a column called test1 defines as (varchar(10),not null) in a table called tab....
Calculate opening hours between 2 dates - Thanks in advance. I have searched tons of sources but none seem to include weekend hours. I have a table called 'Operations'...
trying to get rid of clustered index scan - I have statement below which does a merge join but does a clustered index scan with over 2 million rows...
Unexpected Behavior With TOP clause in a DELETE - I recently encountered some unexpected behavior, or at least not expected by me, using the TOP clause in a DELETE...
effective use of subquery with a where condition - Good day friends, i have the query below: There are two sub queries with joins, the first sub query requires a...
Database Size After Deleting 200-million rows - Hi Guys, I've been going through a process of cleaning up extraneous data, both for compliance and as a bit of...
Weird Resource Database Message in Error Log - I'm getting this message in the error-log each time on a SQL restart. [quote] The resource database has been detected in two...
Split list of string into all possible combinations - I have a table that contains one column and is populated as follows: declare @table table ( Col varchar(100) ) insert @table ( Col...
SQL Query/JOB Error - Hi all, Need advise for my error Executed as user: NT AUTHORITY\NETWORK SERVICE. Arithmetic overflow error converting IDENTITY to data type int....
Multiple Joins on Fact Table - Hi, I am building a DW which will load data from 2 separate sources. Each source will populate the Broker Dim table...
Rebuild Index Task fails - Hi Folks, The scheduled reindexing job has failed with the below error: Source: Rebuild Index Executing query "USE [Msql2d] ".: 6% complete End...
Float vs Decimal? - Does anyone have any opinions concerning the performance of Float vs decimal data types? For example I have a table that...
TSQL RegEx find and replace without CLR - Hi, I am having a table with a column which is having data like # followed by some number for Eg. #123. I...