Viewing 15 posts - 16 through 30 (of 86 total)
yuvipoy (5/20/2014)
vignesh.ms (5/20/2014)
here is the sample
create table Sample (id int ,value int,total int)
insert into Sample (id,value) values (1,1)
insert into Sample (id,value) values (1,4)
insert into Sample (id,value)...
May 20, 2014 at 3:59 am
ChrisM@Work (4/30/2014)
Please provide some realistic sample data so that folks attempting to help won't have the same problem.
Table structure is same... Data only differs
It will always starts and...
April 30, 2014 at 6:39 am
this is not the fine answer & also not mine...
It took much time to solve 1000 , so given answer is for 100
WITH Base(N) AS(
SELECT 1 UNION...
April 19, 2014 at 8:30 am
LutzM (4/19/2014)
Would you mind sharing the logic you came up with to solve the problem? We might be able to help you "translate" it...
April 19, 2014 at 7:46 am
Louis Hillebrand (4/18/2014)
Just a hint: Min quantity = 1,...
April 19, 2014 at 3:23 am
J Livingston SQL (4/18/2014)
vignesh.ms (4/18/2014)
Brandie Tarvin (4/18/2014)
This sounds like a contest or homework problem to me.Should be mixture of all products..
I'm eagerly waiting for the query....
Pls try it out..
ok...here is...
April 18, 2014 at 8:32 am
This is an EXTREMELY complex algorithm. It is similar to the bin packing problem. Both of these are incredibly complex mathematical calculations. Did you even use google as Dwain suggested?...
April 18, 2014 at 8:25 am
Brandie Tarvin (4/18/2014)
This sounds like a contest or homework problem to me.
Should be mixture of all products..
I'm eagerly waiting for the query....
Pls try it out..
April 18, 2014 at 6:44 am
Hello all,
I myself prepared query for the above scenario...
But have some deviation...
I could not able to retrieve last row in the given output
;with cte as (
select ROW_NUMBER() over(order...
April 10, 2014 at 7:24 am
higgim (4/9/2014)
April 9, 2014 at 7:22 am
higgim (4/9/2014)
Your desired output
YYY Ret1 35
YYY 25
Where...
April 9, 2014 at 3:50 am
Luis Cazares (3/21/2014)
Assign it to a variable and execute the variable with sp_executesql or EXEC().
how to assign all at once ?
March 21, 2014 at 10:53 am
whenriksen (3/20/2014)
SELECT * ,
MaxUnits = CONVERT(INT, 1000 / CONVERT(DECIMAL(5), Price))
FROM #sample
We should combine all the products in...
March 21, 2014 at 4:47 am
Viewing 15 posts - 16 through 30 (of 86 total)