Category "sql-server"

How can I remove JSON property stored in a SQL Server column?

I have a task to remove a JSON property saved in a SQL Server database table's column. Here is the structure of my table OrderId Name JSON In the JSON c

How to copy file without using XP_CMDSHELL?

I am using SQL Server 2008. I would like to give users possibility to copy files. Is it possible without using XP_CMDSHELL procedure? Cause i should not change

scaffold-DbContext , command results in exception: System.Reflection.TargetInvocationException

When attempted to run a scaffold command I am now receieving the exception noted below. It may be important to note that this stopped working all of a sudden. C

a function calculate has been used in a true/false expression that is used as a table filter expression which is not allowed

I have a to check the current month and current year value for a measure in ssas tabular model but due to type mismatch i am not able to do this. For this, i ha

Problem with InsertCommand in SqlDataSource. ERROR: System.Data.SqlClient.SqlException: 'You must declare the scalar variable'@EXPEDIENTE'.'

I am a newbie and I have recently started working developing a web application, I do not have much experience so if you are able to solve the problem and explai

Round And Show To 2 Decimal Places? [duplicate]

I have a small question to ask. How to round a numeric field upto 2 decimal places, and also show it with 2 decimal places only For example th

How to connect to a local database in SQL Server Management Studio?

I have downloaded the SQL Server Management Studio (SSMS) 2016 to recover a huge .bak file which is an old backup of a database. But first of all I need to conn

How change few columns to another table with key in SSIS?

I have: Collisions{PK_id, cashLoss, deaths, city, state, county} I want: Collisions{PK_id, cashLoss, deaths, #IdLocalization} Localization{#LocalizationID(a

Microsoft SQL Server Management Studio Opening Error

I installed SQL Server Management Studio and it worked fine. After that I updated my Visual Studio from 2010 to 2013 Express edition, now it is not working with

How do I go back to multi_user mode

Here is my query: IF EXISTS(%some query%) BEGIN BEGIN TRY ALTER DATABASE [MyDatabase] SET single_user WITH ROLLBACK IMMEDIATE; --d

SSIS - Intermittent error "Conversion failed because the data value overflowed the specified type."

I have an SSIS package which intermittently fails with a handful of errors, the two most informative of which are: DFT_PlaySummary SSIS Error Code DTS_E_O

Can't join FREETEXTTABLE with typeORM functions

I'm working on a graphQL backend with TypeORM I found FREETEXT, CONTAiNS, FREETEXTTABLE and CONTAINSTABLE options for fulltext searching in my SQL database. As

How to drop all tables from a database with one SQL query?

I don't want to type all tables' name to drop all of them. Is it possible with one query?

SQL values from a table with multiple groups

I have a table that has multiple persons linked to multiple groups. I have a procedure that needs to bring everyone from group 75588 but if this person is in gr

Find all stored procedures that reference another stored procedure

I want to find the all the directly and indirectly references to DB objects list. I am using below queries but I found the issue. DECLARE @Search varchar(255)

"Insert Into" statement causing errors due to "Parameter 7 (""): The supplied value is not a valid instance of data type float."

I'm loading a batch of CSV files into a SQL Server table using Python one row at a time. The files each contain a number of free text fields and erroneous data

Default row order in SELECT query - SQL Server 2008 vs SQL 2012

Our team recently upgraded our databases from SQL Server 2008 to SQL Server 2012. One breaking change we noticed was in the default order of rows returned by th

SQL Server not listening on IP address even if TCP/IP is enabled

I am trying to set up MS SQL Server Express 2019 to listen on TCP/IP and connect to it through IP address instead of shared memory. I am currently connecting th

Query to display Employee and Manager

I have to write a SQL Server query to display the employee last name and his respective manager’s name, as given below. John works for Robert Jane works f

SQL Server after update trigger

I have a problem with this trigger. I would like it to update the requested information only to the row in question (the one I just updated) and not the entire