Viewing 15 posts - 16 through 30 (of 38 total)
With the proc procedure, is there a way to create a column that assigns a group id?
For example, for those values that reach the limit of 30,you assign an...
September 12, 2017 at 2:08 am
I will give this a go!
The large dataset I have, a single row is not higher than the condition. I will be testing this on a larger dataset that...
September 11, 2017 at 11:45 pm
just move onto next row, which would reset and start a new running total.
Category Value Running_total Page
101 10 10 1
102 20 30 1...
September 11, 2017 at 11:47 am
sorry, previous post 🙂
Just found an "unfinished" post (Link)...this is exactly it...but cant seem to finish it off
September 11, 2017 at 9:11 am
Say i can only fit max of 30 values on 1 page.
101, 102 = page 1
103 = page 2
104, 105 = page 3
106, 107 = page...
September 11, 2017 at 9:05 am
oh cr*p, that has worked!!!
so ORDER BY NEWID() is a random function?
December 1, 2016 at 10:24 am
I cant do that. thats assuming the top 1000 get added. a sku dataset may have 20000 and i need to randomly select 2000, not the first 2000...
December 1, 2016 at 10:05 am
ah ok, makes sense.
that definitely worked.
i tried to convert to varchar but it was the square brackets that was missing.
very helpful all!
😀
August 15, 2016 at 9:15 am
Hi,
that works very well. exactly what i was looking for.
if dates are in the numeric format, then i get the following error:
CREATE TABLE #Crosstab (
ProdID INT,
[42128] CHAR(1),
[42129] CHAR(1),
[42130] CHAR(1),
[42131]...
August 15, 2016 at 3:01 am
Close..but not quiet.
sample data as follows:
CREATE TABLE #Crosstab (
ProdID INT,
[01/08] CHAR(1),
[02/08] CHAR(1),
[03/08] CHAR(1),
[04/08] CHAR(1)
)
INSERT #Crosstab VALUES
(1, 'A', 'S', 'R', 'W'),
(2, 'Q', 'W', 'R', 'T'),
(3, 'D', 'F', 'G', 'H')
CREATE TABLE #Orders...
August 11, 2016 at 10:18 am
Ignore that I said is this an effective way of batching.
What I was meant to say is the way ive described, can it be done efficiently and effectively...or is there...
March 2, 2016 at 8:52 am
I managed to code the set-based iteration and it works pretty fast now!
March 2, 2016 at 7:45 am
Viewing 15 posts - 16 through 30 (of 38 total)