Primary key violation in SQL
This is a bit of an odd one. Below is the code and then I will give some background.Textinsert into occupation select g.state, o.codetype, o.code, o.codetitle from (select state from geog where...
View ArticleSQL Backup - disk space
Does SQL Check for available disk space when starting backup?I need to back a 266 GB DB and I currently have 255GB free. If I started with compression will it...a). do some initial analysis and fail in...
View ArticleSetting up SSMS for non-technical team
Hi folks,I'm building a new solution for our database containing several databases with customers, training course we sell and products we sell. this is being migrated from Access, and for now, I'm...
View ArticleHow to create CSR for MSSQL?
I've never had to deal with SQL that much before, but I've inherited a few SQL servers that I need to get TLS certs for. The main issue I have is how exactly to even create the CSR? Is there any tool...
View ArticleHow do I debug a laggard query in SQL Server?
Hi!I have been learning how to useCommon Table Expressions (CTEs) and Window Functions in SQL Server. I wrote a pivot query against the Sakila Sample Database that fetches the average amount spent per...
View ArticleHow to find what is one table and not another in SQL?
To begin with, I have two tables: codes and supply.Codes has the following schema: state char(2), codetype char(2), code char(6), codetitle varchar(200)Supply has 12 columns but three of them are...
View ArticleSQL Query help
I have a view that runs fine, but I need to make a change to it. When I edit the view for some reason its either missing or adding something and I can't figure it out. Item table contains the same web...
View Articlescript to configure SQL ports
Hi all, not sure if possible, but is there a scripted (automated) way to configure the TCP Port setting like you would do in the SQL Server Configuration Manager? Can I do some registry export, import...
View ArticleSQL Trigger only if changed value IN list
Hi everyone, I'm hoping someone can help as Google has not been my friend. I would have thought that what I am after would be a basic feature so maybe I'm just doing it really badly. I have been able...
View ArticleSQL Monitoring Software
Hello, Hope everyone is doing well in these difficult times.I'm trying to see about a monitoring software that can keep a look out on SQL performance and windows services, Does anyone know of a good...
View ArticleVarchar to numeric
hi the result of this query is that the oldvalue and newvalue are varchar255. How can I change the select so the old and new values are numeric?SELECT TOP (100) PERCENT BCM.Datum AS Date,...
View ArticleFilter records by date -3 months
Hello guys,I am aware that this should be very simple and it might be already answered but i keep tried and can't make it work.I have a simple query that looks like this :What i need to do is display...
View ArticleServer failover database issue
Good day,We were performing SQL Server Failover test during the weekend and on the Replica server when it was up and running, we have noticed that the SQL database was in a restore (pending) state. i...
View ArticleSQL Error in Excel
HiIf I Run this SQL in Excel , my Excel will frees and then I have to kill Excel. IF i run this in SQL Server it will run OK.If I run in Excel and it freezes I then look in my SQL server The next error...
View ArticleSQL Server CAL Licensing for users application access
We are rolling out a new accounting software that uses SQL database. basically, the backend application will be interacting with the SQL database using 1 single user (SA), and we will be having 50...
View ArticleNeed to calc amount for no of months
Hi GuysBLDGID LEASID INCCAT EFFDATE AMOUNT ENDDATE MONTHS R_NOB252GS 014252 BRC 2021-11-02 00:00:00.000 5412.77 NULL 1B252GS 014252 BRC 2020-11-02 00:00:00.000 5229.73 NULL 2B252GS 014252 BRC...
View ArticleSQL Server
we have a Retail organization with office and 15 branches. We need to implement a centralized ERP Solution with SQL server as backendEach branch maintains individual inventory and Accounts. So we want...
View ArticleSQL Server
Retail company with Head Office and 15 branches. Each branch have their own inventory erp application with SQL server database at backend.We need to centralize the database now. That means each branch...
View ArticleMS SQL 2014: Table inaccessible at 08:00 (Sunday) and 06:00 (Monday)
Hi All,We run an ERP system on top of MS SQL 2014 Std.Rather oddly one of the tables becomes inaccessible at 08:00 (Sunday) and 06:00 (Monday). A basic SELECT query fails.Currently I'm rebooting the...
View ArticleSQL Server access denied
I am unable to access a SQL database from my manufacturing software. I have successfully restored the database from a backup and ODBC connections test successfully. I'm trying to connect from the...
View Article