Viewing 15 posts - 1 through 15 (of 2,638 total)
Error - Windowed functions cannot be used in the context of another windowed function or aggregate.
SELECT ROW_NUMBER() OVER (PARTITION BY Account ORDER BY A."Account") AS "RowNo", A."Account" AS "Account", (A."Debit")...
March 26, 2025 at 12:42 pm
RIGHT_SHIFT and LEFT_SHIFT are CPU instructions implemented in hardware using barrel shifters, making them extremely fast, significantly faster than multiplying or dividing by 2 raised to an integer power. However,...
March 19, 2025 at 4:47 pm
The POWER
function is relatively resource-intensive, so a more efficient approach is to hardcode the 30 values directly.
CREATE OR ALTER FUNCTION dbo.ufn_GetStatusMSB_NF
(
@status...
March 16, 2025 at 3:40 am
Sorry, I should have been more specific; the reason I don’t use a temp table is the CTE is in an inline TVF which takes @status as...
March 13, 2025 at 7:47 pm
I just tried this and it works
DROP TABLE IF EXISTS #Numbers
-- Create a temporary table
CREATE TABLE #Numbers (
Num INT
);
-- Populate the temporary...
March 13, 2025 at 4:41 pm
.
March 5, 2025 at 6:23 pm
Ive also tried
SELECT top 1000 [cp_initialreviewId] ,[cp_AssessmentChannelOptions] ,(SELECT [ChannelName] FROM OPENJSON(cp_AssessmentChannelOptions) WITH (ChannelName NVARCHAR(50) '$.ChannelName')) ,(SELECT [Removed] FROM OPENJSON(cp_AssessmentChannelOptions) WITH (Removed BIT '$.Removed'))
FROM [PIP_MSCRM_MI_DB].[dbo].[cp_initialreviewBase]
But I get the error
Subquery returned...
March 5, 2025 at 6:17 pm
You can use OPENJSON in SQL Server to parse the JSON string and extract the required fields dynamically.
Solution
DECLARE @json NVARCHAR(MAX) =
'[{"ChannelName":"LOT4 - Telephone","ChannelRecordId":"42c49edf-9aa1-ec11-b85f-00155d640f76","Removed":false},
{"ChannelName":"LOT4 -...
March 5, 2025 at 5:13 pm
I'm trying to eliminate the function by rewriting the code where it is used. The listed function, Oracle.xxxfloat, I would like to remove from the column2 statement; (These functions...
February 25, 2025 at 7:52 pm
Create a new schema:
IF NOT EXISTS (SELECT 1 FROM sys.schemas WHERE name = 'oracle')
EXEC('CREATE SCHEMA oracle;');
GO
Create the function:
GO
CREATE OR ALTER...
February 25, 2025 at 7:48 pm
Do you have an access predicate table valued function for the rls? If so could you paste it in here?
February 20, 2025 at 6:41 pm
SELECT DISTINCT t.SomePK, t.Ellips, t.CONL, ss1.value AS MatchingWord
FROM #temptable t
CROSS APPLY STRING_SPLIT(TRANSLATE(t.Ellips, '=,/()', ' '), ' ') ss1
CROSS APPLY...
February 20, 2025 at 5:49 pm
It looks like there is more than one row in ICT with the same transaction_header_guid.
In SQL Server you could correctly write it as this:
UPDATE DFR
...
February 10, 2025 at 1:12 am
Thank you!
I have some questions:
1. re the output parameter option solution. Will that message show up in the output window?
2. re the alternative solution. I am getting an error...
February 3, 2025 at 1:10 am
Actually...the above two outputs are not that important. The SP is run in SSIS so I never see the above two issues. Ok for now.
The more pressing...
February 2, 2025 at 4:27 pm
Viewing 15 posts - 1 through 15 (of 2,638 total)
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy