Question We have a job which imports data daily from a remote SQL Server every night, I'll call it Import-Job. Most of the time this job runs through in about 15 minutes and everything is fine but due to a rather unstable VPN connection sometimes the job …
Question I have seen on this site how to get the the third Friday of the month:
select quote_date FROM table where datename(weekday, quote_date) = 'Friday' and datepart(day, quote_date)>=15 and datepart(day, quote_date)<=21; How would I get the first …
Question I have 2 node Windows Failover Cluster with Quorum disk. SQL agent is NOT a resource of the cluster.
I needed to enable service broker on the server; for that I need to set SQL Agent offline, run tsql statement then simply put it back online.
Question Is there a query I can run that will show me all tables with an identity column? Trying to figure out if there are any identity based tables whose current identity is nearing upper bound of int32 or int64.
Question We have had an issue this morning with a report failing due to the following error:
"Conversion failed when converting date and/or time from character string"
The issue is that in the database we had a value (in a VARCHAR field) of: '31.07/2021'
Question Is there a way in SQL Server 2012 to get what the server time zone would be on a particular date/time? In SQL Server 2016, you have AT TIME ZONE, but that's not available in 2012. I have a datetimeoffset and I need to convert it to the server's …
Question I came across some weird behavior: While passing a float value into a varchar column, the values are getting converted from integers into scientific notation, and it's that scientific notation that gets stored as a string.
Question I have been using linked server with the old provider (SQLNCLI) without any issue, as recommended by Microsoft, I'm planning to switch to new provider (MSOLEDBSQL). I'm able to add linked server using following T-SQL after installing the drivers
Question I understand that table partitioning is mostly done for data management. I understand that table maintenance becomes more difficult for large tables, since e.g. an index rebuild cannot fit in memory or because e.g. sorts scale with O(n*log(n)) and …
Question ALTER PROCEDURE [dbo].[usp_BaseScan_CycleCount_Report] @StartDate varchar(10), @EndDate varchar(10) AS BEGIN IF @StartDate AND @EndDate IS NOT NULL SELECT * FROM dbo.CycleCountHistory WHERE RecordDate BETWEEN @StartDate AND @EndDate ELSE SELECT * …