Category "sql-server"

how to get no of dates appear between Fromdt to Todt and fetching thouse dates in column

![enter image description here][1] I have table called tbl_monthly_leave in below table i am trying to take dates between fromdt to Todate like (Fromdt , Todate

Can I set a default value for field.types when using dbWriteTable?

I'm trying to write a dataframe to SQL Server using the following line dbWriteTable(conn,"r_test_upload",df, field.types = c(longnotes ="varchar(max)")) By d

Alternative for Cartesian and Cross Join

I want to output all the possible combination in two tables without using cartesian join or cross join. Is this possible?

How do I read SQL stored procedure data through pyodbc and get results into a dataframe?

I have a stored proc in SQL Server called test.storedproc My py script is as follows import pyodbc import pandas as pd conn = pyodbc.connect('Driver={SQL Server

Making database mdf work across different computers

I know this is kind of a stupid question but it gives me a lot of problems. Me and my partners in college projects have a lot of issues making the database mdf

Return smalldatetime value from scalar function SELECT query

I'm looking to create a scalar function in SQL Server (2017) that leverages a calendar table I built awhile back in order to calculate and return a date a given

Remove banned words then collapse the data

Gets 'exact' banned words matched against a set of blog comments. It then creates a result set collapsing the banned words into the owner (the blog comment) sho

Pivot data based on category and date field

I have to identify the records with check_in category of S1, T1 and P1 in the check-in-order and pivot the rest of the data until we hit the next category. I wa

Is there a way to completely reset a SQL Server instance without uninstalling?

This is using Microsoft SQL Server 2012. I have a program that has multiple versions, each one has some schema changes to the underlying SQL database. In an at

SQL Server : MERGE causing cannot insert the value NULL into column

I am doing a MERGE in SQL Server using the following code MERGE INTO DW_Datawarehouse.[dbo].[DWF_WAREHOUSE] with (HOLDLOCK) AS target USING #DataSource AS Sourc

sql server net_address

I have 2 applications in IIS which are calling same database. When I am executing the stored procedure which has below query, it returns 2 net_addresses every

Check that Serilog is configured correctly

In my ASP.NET Core Web API application I have a Serilog set up to log different types of events (Information, Warning etc) into different tables in a SQL Server

T-SQL C# CLR Execute permissions being lost on assemblies when are redeployed

I have inherited a VS2015 .NET C# project that deploys C# assemblies as CLR stored procedures to SQL Server 2016. It has worked seamlessly for many years. Howev

MSSQL 2019 Installation Problem How to solve Microsoft OLE DB Driver for SQL Server

While trying to install MSSQL 2019 ON Windows-10 I got a problem. I was almost done with the installation when this pops up: If I skip it, I won't be able to a

The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "Unexpected rethrowing"

I'm using java 11, and Microsoft SQL Server 2008 (RTM) - 10.0.1600.22 (X64) Jul 9 2008 14:17:44 Copyright (c) 1988-2008 Microsoft Corporation Enterprise E

SSMA Column "column" does not allow DBNull. Value

I'm right now trying to migrate a Mysql db to Sql Server, I found in some forums that they recommend to use SSMA (SQL Sever Migration Assistant) but when I try

Azure Automation Runbook ADAL SQL support

I am attempting to use an Azure Automation Runbook to run a query against an Azure SQL database using Azure AD credentials: $cred = Get-AutomationPSCredential

Find highest-ranked pieces of intersecting rows in SQL

This probably falls into that "I could google it if only I knew the proper name for it" category, but here goes. I have a table of intersecting activity timefra

Convert select query results into Json

I want to execute a select query on a table and I need this result in a JSON format or in an excel sheet. I want to do this using query only and I'm using SQL S

How to automate running of Jupyter Notebook cells periodically

I want to integrate my jupyter notebook with my website, where I have written the code to fetch real-time data from MySQL server and do real-time visualisation