336,362 questions
Score of -3
0 answers
26 views
Problem facing while migration Data NAV16 to NAV16 in the Database [closed]
I’m currently working on a Microsoft Dynamics NAV 2016 to NAV 2016 data migration project, and I’m facing a challenge where I’d really appreciate some guidance from people who have handled similar ...
Advice
0
votes
1
replies
91
views
Does SQL Server 2016 Database support built in sharding? If it is then what's the standard way to do this?
Does SQL Server 2016 support database sharding as a native feature? If so, what is the standard method for implementing it?
If not, is table partitioning the recommended alternative for managing data ...
Score of -3
0 answers
72 views
Calc with Power not showing correct Value [duplicate]
I have a formula that I am trying to use in SQL and the value I get is different from when used in Excel. Can you see if the SQL needs to be tweaked to get the correct value?
Excel formula - for test ...
Advice
0
votes
5
replies
111
views
Group By Help - Msg 8120, Level 16, State 1, Line 1
I'm getting an error saying Service.Name does not exist but I can clearly see it in my table.
Query
SELECT TY.Name
,SER.Name
,PAK.[1_Year]
,PAK.[3_Year]
,PAK.[5_Year]
FROM [...
Score of 0
0 answers
81 views
Filtered .Include(): The type arguments for method ... cannot be inferred from usage [closed]
I have the customers and the balance SQL Server tables. They are bound through Custno and Shiptoaddr columns. The Customer model uses the Balance as navigation property. The goal is to get zero or one ...
Score of 0
1 answer
139 views
If product code does not exist in first part of query pull a declared value from another table for that product code
The first table I have stores fixed prices on product codes SellPriceRule and I show the query I have to get the list I want. The problem is for certain customers - using 1 as an example 7000192 - the ...
Score of 0
1 answer
177 views
Add a column to select query but exclude from grouping
I have the following query:
SELECT
MAX(F.Surname + ', ' + F.First_Name) AS Female,
ISNULL(MAX(M.Surname + ', ' + M.First_Name),'') AS Male,
MAX(CP.Comp_Date) AS Comp_Date,
H....
Score of 0
0 answers
119 views
Legacy SQL Server jobs for data migration issues
We handle data migrations using scheduled SQL Server jobs.
A month ago, I got a new requirement to migrate the last_add2, batch_no_all, and box_num2 values from a remote database. I updated the stored ...
Advice
0
votes
2
replies
78
views
Copying data from Oracle to SQL Server, with logic to reorganize data
My company has a customer that holds a large amount of data in the Oracle NetSuite product. This uses a very complicated data model. For fast reporting of the data, my company has provided our ...
Advice
1
vote
4
replies
181
views
How can I show only the first instance of a SQL count?
In SQL Server, I have table myTable with fields patientID, orderID, and orderDesc. patients can have multiple orders with individually variable descriptions.
I’m requested to write a query to select ...
Advice
0
votes
1
replies
82
views
Using timeout for Python's pyodbc
I am working on a project where I would need to query from MSSQL server. I am using Python and pyodbc for the work, and I want to use timeout for QUERY EXECUTION. But there is no direct way. Is there ...
Score of -2
0 answers
127 views
Create DSN for SQL Server with Username and Password
How to automatically create DSN for connection to SQL Server with supplied username and password?
The following code I have used worked if I am not supplying username and password, but I need the one ...
Score of 2
1 answer
132 views
Unexpected behavior with using a CTE to update a temp table
DDL:
IF OBJECT_ID('tempdb..#Tab2And3Pop') is not null
DROP TABLE #Tab2And3Pop;
SELECT CAST(115704 AS INT) AS ConflictNoticeID
, CAST(16003573 AS INT) AS MerchantID
, CAST(13 AS ...
Advice
0
votes
8
replies
90
views
T-SQL hint to block key lookup, without forcing a particular index
Is there an index hint in T-SQL that says "do not use any nonclustered index that would require a key lookup"? Apart from that one restriction, I want to let the query planner have a free ...
Score of 1
2 answers
195 views
Query `select count(distinct columnname)` returns zero for non-admin user
For a non-admin user, with 'Select' permissions on a 'View', they are able to count the number of rows and display all the contents of a SQL 'View':
select * from dbo.BackupInfoView;
select count(*) ...