Skip to content

Tag: sql-server

Parameters in ASP.NET MVC to create a PDF

I have a particular problem, I am working with ASP.NET MVC in C# and SQL Server. The idea is that on the main screen you see a text box and a button, entering a number that brings us our data. By bringing that data, the person can choose whether they want to see if that data in a PDF. But,

How to delete sub-folder database in SQL Server?

When I create a new database, a lot of sub-folders and some tables are created, I want to ask if they are needed or not? I have tried to find ways to delete some unnecessary things but did not find a way? Answer You cannot delete them: Hide System Objects in Object Explorer Options -> Environment/Startup -…

Converting month name to month number in SQL Server

I have a column (says Period_name ) that accepts varchar value. Inside the column, I have inputs likeJan-19, Feb-19, etc. I need an SQL instruction whenever left of Period_name comes like Jan, Feb then it should convert into corresponding month number. For example Input Output The SQL query condition is as fo…

How to insert the result in the desired row? SQL Server

I need the result that I got to be inserted in the right row. That is, instead of WHERE id_prod = 1, there was something that inserted the desired result in all rows. I’m not sure I made myself clear, but I hope that you will understand. Answer I think you want There is no need to use a variable

SQL Server how to find specific data across entire database

I have this script which finds all tables that contain data in column RGNCODE. I’m trying to amend this to find tables that contain a specific value for rgncode across all tables. So RGNCODE = ‘UK’. Unsure where to add this in? Answer A dynamic statement, using system catalog views, is an op…