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 |
Need help accessing and loading a temp table - I'm trying to dynamically create a temp table, basing the column names on another table. It appears to be working (???) but I can't select or insert any data into the table that was just built? Here is a test of what I'm trying to do. IF OBJECT_ID('tempdb..#source_table', 'U') IS NOT NULL DROP TABLE #source_table; […] |
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 - Administration |
Running DML on a Primary AG Instance - Kind of a DML question - but specific to an AG instance running on SQL Server 2019 - so starting here. We have 3 AGs and 3 SQL Server 2019 Instances. I cannot so easily remember the AG listener names so I often use the Primary Instance name instead - thinking that other than 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 […] |
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 |
SQL Server 2022 - Development |
SSIS XML Source Columns Don't Match XML/XSD - In my SSIS package I have a Data Flow with a XML Source with the below XSD. The problem I have is when I try to do a Data Conversion and subsequently an OLE DB Destination, the columns available for PortfolioExport__PortfolioData__OfficeParks__OfficePark__Properties are Properties_Id and OfficePark_Id. What I need are the OfficePark.Id and the Properties.SourceId. I […] |
Get days between 2 dates excluding weekends. - Hello all. Trying to measure the time in days between to dates excluding weekends. Currently I have this but I am nit sure how to use the generate_series command in this code so there are errors. Select fsono, fcompany, forderdate, confirmdate, confirmed--, (select Count(*) as daysopen from generate_series(a.confirmdate, a.forderdate -interval '1 day' interval '1 day') […] |