Viewing 15 posts - 1 through 15 (of 23 total)
please, disregard this question, it was badly composed
June 21, 2022 at 9:37 pm
Dynamic SQL could achieve the "writing less code" goal using something like this:
Thank you, ratbak for the idea! I will learn from it
June 20, 2022 at 5:16 pm
Hello!
Thank you, Thom for your questions!
Do all the linked servers definitely have the table dbo.qc in the database w?
Are all these objects exactly the same definition?
The answer is yes to...
June 20, 2022 at 4:39 pm
Thank you, ratbak! Sorry, but I can't really catch your drift. Do you mean that with dynamic SQL it is somehow possible to do FOREACH or write less code?
June 20, 2022 at 4:33 pm
just to update and close the problem
LEAD(return_value ,offset [,default])
OVER (
[PARTITION BY partition_expression, ... ]
ORDER BY sort_expression [ASC |...
June 16, 2022 at 10:38 am
Thank you everybody so much and especially @ScottPletcher for the invaluable input. I studied your approach and learned a lot from it!
Please, consider the following code
/* input *********************************/DECLARE...
June 11, 2022 at 1:10 pm
Very special thanks for the technique to check what dynamic produces!
June 8, 2022 at 7:16 pm
Thank you, Jeff! I'll look into dynamic approach.
June 7, 2022 at 10:36 am
Thank you Jeff, for your follow-up!
The entire table might exist or not. The reason for that—versions of the particular app, so the query must be just one but run in...
June 6, 2022 at 11:01 pm
Exactly! there's no way to nest 'with', but one can chain them.
Thank you!
June 6, 2022 at 10:21 pm
found the answer
https://stackoverflow.com/questions/18010850/sql-with-clause-within-a-with-clause
Happy coding!
June 6, 2022 at 5:33 pm
USE [LSWDS]
declare @tt table (dt date, QueueName varchar(10), Prm varchar(10))
insert into @tt(Dt, QueueName, Prm)
values
('2001-04-04','Queue0001','Q1P01'),
('2001-04-05','Queue0001','Q1P01'),
('2001-04-06','Queue0001','Q1P02'),
('2001-04-07','Queue0001','Q1P02'),
('2001-04-08','Queue0001','Q1P03'),
('2001-04-09','Queue0001','Q1P03'),
('2001-04-04','Queue0002','Q2P01'),
('2001-04-05','Queue0002','Q2P01'),
('2001-04-06','Queue0002','Q2P01'),
('2001-04-07','Queue0002','Q2P01'),
('2001-04-08','Queue0002','Q2P01'),
('2001-04-09','Queue0002','Q2P02');
with sinceQueueDate (QueueName,Prm,SinceDt) as
(
select distinct QueueName, Prm, FIRST_VALUE(Dt) over(partition by QueueName,Prm order...
May 1, 2022 at 6:29 pm
Hello!
Let me please ask you for advice again
Attached is another example of a xml file, now with 3 layers of data below point of entrance '/config/queues/queue', so to speak
For the...
April 30, 2022 at 1:40 am
Thank you, Eddie! This is way more elegant than my approach
April 21, 2022 at 1:48 pm
Viewing 15 posts - 1 through 15 (of 23 total)