Restore DB takes a coffee break to open file explorer - Hi all! This has been a problem sice my first SQL DB's in 2005. When i want trestore from device, it's really...
Practice T-SQL - Hello All, Do you know where i can find a project to train my T-SQL knowledge? from writing new DB with tables,...
How do I state my foreign key in my Create Table? - Hi Expert, I tried to create a table with foreign key but I am not sure why it is giving me...
Linking rows based on matching fields - I have a sub-set of customers : CREATE TABLE #temptable ( int, nvarchar(20), date, nvarchar(50), nvarchar(10)...
Update Statistics - I have observed that for some tables the statistics have not been updated for a long time but the rowmodctr...
Performance improves after reboot - I am an ETL Developer who was asked to look at SQL Server performance problem. We have two DBA's but they're...
Converting Numbers to Letters - Hi Everyone, I am looking to convert numbers in a delimited string to corresponding letter. For example, if the string is '2,3,4' I...
Round decimal - Hello, when in my select I have 0,00 (decimal (4,2)), how can I round it to 0? Thanks a lot. Luigi
Optimizing a query - This needs to be a SQL view for C# to consume. I am sure there is a better way to...
IO Performance Problem - We have a periodic problem on our sql server that I'm totally stumped on. This is on SQL Server 2012,...
Find Matching People in table based on similar values - Hello All, I'm trying to find a method that will run on Data-sets of 100K rows to a million efficiently and...
Non-ANSI equal join - SQL 2012 - I recently found a non-ANSI select statement with equal joins executing against a SQL 2012 (compatibility mode SQL Server 2012(110))...
To find that particular day top performer and overall performer - Top performer for that particular day is calculated by (Goodcheckin-Badcheckin) for that particular dayOverall top performer is calculated by (Goodcheckin-Badcheckin) for...
Corruption when restoring/renaming databases - Hi i am trying to move databases to new SSD drives but some have dozens of logical file and are...
How to avoid cursors - Hi All, I'm now the new accidental DBA. We have some non-prod DBs, but most of the DBs are production DBs...
Invalid length parameter passed to the LEFT or SUBSTRING function. Trying to remove everything after the period - I have a table that has Machinename that looks like the following: TH1239.CDB.LOCAL TH1238.CDB.LOCAL TH1237.CDB.LOCAL TH1236.CDB.LOCAL TSB1-TLA.CDB.LOCAL TSB2-TLA.CDB.LOCAL I would like to remove everything after the . SO...
Exists on where clause - Hi, Sample data to play with Declare @vendor table(IdVenor int,MessageId int); Declare @vendor_customer table(IdVenorCustom int,MessageId int); Declare @Message table(MessageId int, description varchar(4000)); insert into...
Poweshell script to script out jobs, databases, users, linked servers, logins, roles, alerts, etc from a list of servers - create a c:\servers.txt file with list of servers and copy the following into a file .ps1 enjoy function getwmiinfo ($svr) { gwmi -query "select...
SSIS Agent Job Passing Parameters - I'm trying to set up a SQL Agent job to run a SSIS package. I want to pass a parameter to...
Many to Many Relationship Design Query - Hi, I have a table - TagDetail - that stores the many-to-many relationship between Tag, ParentTask, and ChildTask tables. Basically any 'Tag' can relate...