Questions tagged [sql-server]
Microsoft SQL Server is a relational database management system (RDBMS). Use this tag for all Microsoft SQL Server editions including Compact, Express, Azure, Fast-track, APS (formerly PDW) and Azure SQL DW. Do not use this tag for other types of DBMS (MySQL, PostgreSQL, Oracle, etc.). Do not use this tag for issues on software and mobile development, unless it is directly related to the database.
sql-server
27
questions
0
votes
0
answers
2
views
SQL Server Memory-Optimized tables: timestamp columns
I am researching how to convert some physical tables to memory-optimized tables.
But these tables have timestamp column.
This data type is not supported in MO. How to replace it? Now these columns ...
1
vote
0
answers
24
views
Pivot query in SQL Server with nvarchar datatype
I have a table as below "table1"
Here value is of type "nvarchar(300)" but it contains both numeric string and string values.
ID
DocID
Name
Value
1
4
A
1234
1
4
B
false
2
4
A
...
2
votes
1
answer
63
views
Join tables with condition that all row values are unique
I have tables Machine and Inventory. In table Machine I have last running inventory properties. In table Inventory, I have new inventory id and properties (Not yet run in machine).
I have to return a ...
0
votes
0
answers
24
views
Handling Varbinary Datatype in Node.JS API header with SQL Server
The API program didn't accept a varbinary format for my Node.JS API with a header key and varbinary value to authenticate my API request with Node.JS.
I've tried the straightforward approach by ...
0
votes
0
answers
13
views
ODBC Connection Error in Python Virtual Environment: `Login failed for user 'userx'` (SQL Server)
I'm facing an issue while trying to connect to my SQL Server database using pyodbc and SQLAlchemy in a Python virtual environment on my M1 Mac. The connection works perfectly in my global Python ...
-2
votes
1
answer
34
views
Extract Combination of values from 1 table not in another table
2 tables with similar information. There are n number of Unique Teams and 2 unique Types and 2 Unique Products. So, for each Team there are 4 rows in Table 1.
Table 1
Team
Type
Product
Team1
New
TV
...
0
votes
0
answers
22
views
"Could not find server in sys.servers", not sure why I am getting this error? [duplicate]
Here is my code. I am trying to run my stored procedure that updates my tables:
import pyodbc
import logging
import json
import pandas as pd
import sqlalchemy as sa
import warnings
import time
def ...
-3
votes
1
answer
36
views
Count a table based on another table column [closed]
I have 2 tables, table F and table D. I want to count records from table F based on table D column called 'Oper'. I need to filter values between 160 and 165.
TABLE F
DEP
NUM
SERIAL
01
00001
1
01
...
2
votes
2
answers
88
views
SQL Server behaviour when both incrementing a variable AND updating a column
I'm attempting to replicate the issue described in this previous S.O. question, where the goal is to:
find the maximum NON-NULL value in a column
update all the NULL (missing) values for that column ...
0
votes
0
answers
37
views
Why does this VBA code connecting to a SQL database return a syntax error?
This SQL query works perfectly in my Advanced Query Tool setup, but returns a Syntax Error when I plug it into the following SQL query:
Dim conn As ADODB.Connection
Dim rs As ADODB.Recordset
...
0
votes
0
answers
17
views
SQL Server 2022 migration: Method not found: Microsoft.SqlServer.Dts.Pipeline.Wrapper.IDTSComponentMetaData100
I have an SSIS custom component which was developed sometime ago, we are migrating our databases and SSIS packages to SQL Server 2022 and I am getting the following error when trying to use the custom ...
0
votes
0
answers
40
views
Incorrect syntax near go: select with where clause
This is okay:
select 1
go
This fails:
select 1 where 1 = 1
go
WHY? I'm using SMSS v18.12.1
I removed the 'where' clause and the statement works with the 'go' on the next line. Added the 'where' ...
0
votes
0
answers
36
views
How do I add a SQL script to database in SSMS [closed]
I have this SQL script that collects a bunch of tables and joins them together to present information to me.
My questions is how do I add this script to the database and make it live there? Is there a ...
0
votes
2
answers
55
views
Moving database contexts to library project results in "FileNotFound" exception
I have a .NET Core 7 solution EIT which had only 1 project: EIT. This project uses Entity Framework Core to model and access the database. This worked fine.
Now I want to add several Windows services ...
1
vote
0
answers
27
views
Ordinal enum mapping with Hibernate 6.5
I'm upgrading Hibernate from 6.1.7 to 6.5.2, there are many enum columns in my entities marked with
@Enumerated(EnumType.ORDINAL). My codebase has to run against both Oracle and SQL Server.
The ...