Here's a few of the new posts today on the forums. To see more, visit the forums.
|
SQL Server 2016 - Administration |
Changing Machine Type - Hi, presently my azure server running under Standard_D64ds_v4 .i am planning to upgrade the server . can you please help me what is next configuration . |
SQL Server 2016 - Development and T-SQL |
How to get result from deleted row - Hi Guys I have a store proc that delete a row from a and I would like to get the result of the deleted row whether be =1 or True in order to execute another store proc. Could this be possible? ---- I am aware this code won't work I am trying to explain what […] |
Joining against min date only - This is one of those things very hard (for me)to explain in words. See image below, the requirement is assign all of the sales with Reqdate prior to the "Best Before Date" but ONLY the earliest "Best Before Date." I am trying to do this only with T-SQL. My full scenario is of course more […] |
Union where it matches against only one shared column - Hi folks I have two tables, both with a NAME, START and END fields I'd like to list all of the rows from Table A, and then only the rows from Table B where only the START does not exist in Table A. The NAMES in Table B will ALWAYS be different from those in […] |
SQL Server 2019 - Development |
Replace calculation in cursor with set based logic - Hello and thanks if you can help. The calculation in the cursor is correct. Alas my attempt at doing the calculation in a select statement is not. SQL Server 2019 DROP TABLE IF EXISTS #Test CREATE TABLE #Test (PricingDate DATE NOT NULL,Price DECIMAL (5,2) NOT NULL,Factor DECIMAL (9,7) NULL) INSERT INTO #Test VALUES ('2025-04-01',11.94,NULL) INSERT […] |
t-SQL help.. - I have the following...anyone can point me the right direction to rewrite this code? IF Object_id('tempdb..#TMP1') IS NOT NULL DROP TABLE #TMP1 IF Object_id('tempdb..#TMP2') IS NOT NULL DROP TABLE #TMP2 SELECT * INTO #TMP1 FROM ( SELECT 1251470 XID, 1569175 TRX, 59164 CID UNION ALL SELECT 1251470, […] |
what etl tool are folks moving toward? - Hi as we replace on prem machines , sometimes not with vm's, what should we be thinking about for etl? from my little corner of the world where we use both talend and ssis, and where talend is getting costly, and where ssis is slowly being squeezed into a call from data factory to an […] |
How to update using data from three tables? - I am in the process of migrating from MySQL to SQL Server. I have tables like this: create table OldTable ( id int primary key, tagpath varchar(255), retired bigint ) create table DataTable ( tagid int not null, tagValue float ) create table NewTable( id int primary key, tagpath varchar(255), retired bigint ) The DataTable.tagid […] |
General |
Count of Distinct Values - Hi If value is 21000030 it should return 4 not 5 . In first record 21000030 exists 2 times 21000032 then it should return 3 not 4. USE [Live] GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO SET ANSI_PADDING ON GO CREATE TABLE [dbo].[OCRD]( [CardCode] [nvarchar](15) NOT NULL, [Emp_1] [nvarchar](10) NULL, [Emp_2] [nvarchar](10) NULL, […] |
SQL Server 2022 - Administration |
Snapshot Replication: Pre-application script to check prerequisites - Is it possible to write a script that checks a subscriber's environment for prerequisites and prevents the application of the snapshot if those prerequisites are not met? I'm familiar with adding the (pre/post) scripts to the Publication, but not how I can force the job to fail before the snapshot gets applied. |
install sql express - I yesterday dowload a sqlexpress and intalled on one of a testing database for one of my test applications. After Install I found i n sql server configuration manager there are two intances installed, one is called sqlexpress, one is called MSSQLServer. Both of them are sqlexpress Edition, I cannot remember how comes it installed […] |
Sever Migration - Hi, one of my server configured with Standard_D64ds_v4 what is next level of version is it Standard_D98ds_v4 or Standard_D128ds_v4 |
How to check if credential password for TDE matches the secret key of Key Vault - Hi all, In my company we have many databases encrypted with TDE and there is some automatic process or pipeline that is not working correctly and updates the secret key in the Key Vault without applying the change also in the credential password in the SQL server. I need some help while we found this […] |
SQL Server 2022 - Development |
Select Returning Blank Rows - I have the following select statement --#1 Select supplier, s.refnum, desc from supplier as S Where s.refnum = '123456' This brings back records for me. But when I use the field name instead like in #2, I get zero rows --#2 Select supplier, s.refnum, desc from supplier as S where s.refnum in (select refnum from […] |
How to update a history table with changes. - Good morning to all. I am a novice when it comes to SQL so my question is TSQL related on how to update a history table with changes to thousands of records without a cursor. Currently here is my code with cursor. I know I can update the price for all the parts in one […] |