Viewing 15 posts - 16 through 30 (of 64 total)
@jeff Moden:
Now, my question is, what is the actual functionality that the OP is asking for in the original post? Although it looks like βusing VALUESβ in a...
December 4, 2012 at 4:52 am
Seems legit, thanks π But the syntax, man... I'll probably just write my own set of methods...
create function EqualI2(@i1 int, @i2 int)...
create function EqualI3(@i1 int, @i2 int, @i3 int)...
...
create function...
November 29, 2012 at 12:38 am
@cadavre: The function should be able to compare multiple values (for example up to 20), then I would need to write a lot of 'default's to compare just...
November 28, 2012 at 7:41 am
Yes, with stored procedures this is easily achievable, but I cannot use it in scenarios like:
declare @t table (Id int, I1 int, I2 int, I3 int, I4 int, I5 int)
--...
November 28, 2012 at 7:23 am
Thanks for reply, willl try to find some ProgressDB forum and ask there.
November 27, 2012 at 1:26 am
Beautiful, thanks π
November 8, 2012 at 4:18 am
@Phil - thanks, much simpler than my solution π
November 8, 2012 at 2:34 am
Got it π
First we need a table function which returns all integers between x and y (the function is stolen from somewhere, don't remember where...):
create function [dbo].[f_table_numbers] (@st bigint, @end...
November 8, 2012 at 2:19 am
Hm... I could create table valued function which gets an id from first table and the number of repeats from second table and performs a cross join... Will try it...
November 8, 2012 at 2:09 am
I want my results to be grouped, your query is totally correct. I was just curious if there is any reason behind the decision, that you used dense_rank() instead of...
July 1, 2012 at 11:43 pm
It is exactly the same as yours, I just replaced dense_rank function with row_number:
SELECT Username,
DateFrom = MIN([Date]),
DateTo = MAX([Date]),
CodeFrom = MIN(Code),
CodeTo = MAX(Code)
FROM (
SELECT Username, [Date], Code,
rn...
June 29, 2012 at 3:10 am
@ChrisM@Work - that's it, thanks π
Is there any specific reason why you used dense_rank function? I tried with two row_number functions and it still works ok.
June 29, 2012 at 2:54 am
@ColdCoffee: no, I tried that. The query
select
row_number() over (order by Code) RowNumber,
row_number() over (partition by username order by code) RowNumberWithPartition,
row_number() over (order by Code) - row_number()...
June 29, 2012 at 1:33 am
Wow, how could I miss this one π Thanks, that's exactly what I needed.
One question remains - what is the best way to somehow save the settings of the current...
May 8, 2012 at 6:26 am
Interesting, I got completely opposite times. Will test it again though, maybe I forgot clustered index on ShiftsTable...
I am using nolock because the inserts should not be blocked in any...
October 24, 2011 at 4:31 am
Viewing 15 posts - 16 through 30 (of 64 total)