Category "sql-server"

How to connect over sshtunnel to remote sql server with "2 jumps" in python

after days of research and fails with this problem. Context: I need to connect remotely from a python script to a remote database and I have the following restr

SQL Parse Json array to rows

I'm trying to parse the 'custinfo' array to rows, rather than specific columns how I have in my query (there can be none or many values in the array) DECLA

How to properly install pyodbc and drivers on M1 mac

I have a new M1 pro macbook and I'm trying to install pyodbc and relevant drivers on my machine. So far I have installed unixodbc via homebrew and ODBC drivers

How to translate this SQL into LINQ, with correlated subquery single table

The raw SQL uses correlated subquery for single table, any possibility to translate this with single LINQ Query? SELECT * From dbo.Products AS P1 WHERE SalePric

SSIS Power query connection manager error

I install SQL Server Connector for Power Query for SQL server 2017. Create SSDT SSIS package with power query connector. It works perfect in SSDT! But when I de

how to configure replication(read-replica) for MS-SQL in Cloud SQL?

I am exploring Cloud SQL and the various flavours (MySQL, PostgreSQL, MS-SQL). I am able to create read replicas for MySQL and PostgreSQL, but I don't find that

How can I use a SQL Server sp_* stored procedure/function in a if case?

I'd like to check the catalog existence before I create or use it, so there is go. sp_fulltext_catalog 'testcatelog1', 'create'; if not exists (select 1 from s

Get data from a table after having closed the session

In this moment I´m try to get a List of users and checks if the user is in the BD or not I´m using Web API Net 6 and Sql Server This is the code

With only the Select and View Definitions permission on a view, can SQL queries be sent from Excel without needing to type the query each time?

I have views that my users often only need to check for one particular person at a time. To do this, they do the following in Excel 365 desktop: Open a blank wo

Inserting values from another table into a column where values are null

I have a table A with ID's only and another table B with two columns, ID and Product Number. The ID column in table B has nulls and Product Number has Product N

Splitting column value by '\' in Sql server

I have some data in FileFullPath Column Y:\dfs-dc-01\Split\Retail\Kroger\Kroger\FTP-FromClient\Oracle\2022-05-04\MSudaitemlov_20220503 Y:\dfs-dc-01\Split\Retail

SQL- Find all students who all of their friends have score less than 10

I have to write some simple queries for my database homework using SQLServer. The schema has been provided in the question: students(student_id, name); friends(

No suitable constructor found for entity type 'CoordinateSystem'

I'm trying to generate a migration file with a spatial column in it (Geometry) and I'm getting this error No suitable constructor found for entity type 'Coordi

How to exclude escape characters from ROOT when using FOR JSON from SQL server

I am trying to create JSON output from SQL Server using FOR JSON. My JSON record is good however I have a number of elements I need in the ROOT section but this

SQL Server Reporting Service (SSRS) on Azure SQL Database [closed]

Azure SQL Database supports Full recovery model and we can't change the recovery model of Azure SQL Databases. As mentioned here while making

Incorrect Syntax near WHERE error in generated SQL

I am generating the below SQL. From my code I am using a where condition list to collect all the Where logic and insert it after the Join logic is set-up. Howev

VBA stored procedure SQL Server

I'm trying to send data from excel spreadsheet to sql server. The code runs properly but the change of status is not done. Before those steps, I already added d

Azure SQL Database: Full text index on certain emails does not work

I have a full text index defined on user table's username column. When there is any character following + symbol in email in the search query there is no result

SQL Server Change Data Capture - Validating Incremental Window

I want to implement an incremental load process using SQL Server Change Data Capture. Every example I find takes the "happy path." In other words, they assume t

SQL Replace command with Regex

So I am trying to run this SQL command Select Replace('[1,2,3,47]','%[0-9]\,|\[|\]%',''); this regex should give the following result 47 however, the original