Viewing 15 posts - 271 through 285 (of 901 total)
Phils is the best one of the two and it should run a lot quicker.
If you want to see the totals after each discount then you may have to look...
March 26, 2013 at 10:21 am
This should do what you need, and serve as a starting point
CREATE Table #disc
(
SaleId tinyint
,Discount Decimal(5,2)
,Seq tinyint
)
Insert into #disc
Values (1,0.15,1)
Insert into #disc
Values (1,0.05,2)
Insert into #disc
Values (2,0.05,1)
Insert into #disc
Values (3,0.05,1)
Insert...
March 26, 2013 at 9:50 am
kk.86manu (3/25/2013)
Please refer the below links
http://www.sqlservercentral.com/articles/partition/64740/
Steps i would suggest
1)Create a new partitioned table with a clustered index on the partitioned column
2)Load the data from original table...
March 26, 2013 at 9:23 am
I don't think theres a performance benefit of using the @@IDENTITY or SCOPE_IDENTITY() however if you are going to have multiple processes hitting the same tame then you really should...
March 25, 2013 at 7:26 am
It depends, usually on the complexity of the data and volume.
I personally take the approach of Landing data as is from the Source system, with maybe a few meta...
March 25, 2013 at 3:21 am
SQLSeTTeR (3/22/2013)
March 22, 2013 at 9:54 am
You can do it using
CREATE PROCEDURE dbo.TEST
AS
DECLARE @ProcName sysname
SET @ProcName= OBJECT_NAME(@@PROCID)
Print...
March 22, 2013 at 8:36 am
I've been looking at this and is it a case of you want to match all entries against the draws they were entered for or is it to match for...
March 22, 2013 at 7:38 am
Eugene, very well put.
I personally would arrange a meeting with you, the developer involved, his boss and your boss, and ask him to state why he needs these rights.
Then...
March 20, 2013 at 4:34 am
The simplest way is to do this as you now have the @VoucherType1 set is to dot his
CASE @vouchertype1
WHEN 'Discount' THEN @amountvalue
...
March 19, 2013 at 6:55 am
I probably got hold of the wrong end of the stick.
But I think you will find the problem is the SET @Vouchertype, if you add a Print @VoucherType after...
March 19, 2013 at 6:16 am
I think you will find that this is the problem
SET @vouchertype = LTRIM(RIGHT(@vouchertype,LEN(@vouchertype)-CHARINDEX(' ',@vouchertype,1)));
As you seem to be taking Right N characters, in @vouchertype, and over Writing it so If...
March 19, 2013 at 6:00 am
Deque (3/8/2013)
March 8, 2013 at 7:55 am
Ok, I take it you got an Error being reported about month?
select
[month]
,dramount
,cramount
from table1
...
March 8, 2013 at 7:47 am
Post the code that you've written and I (or other members) will point out the error.
March 8, 2013 at 7:39 am
Viewing 15 posts - 271 through 285 (of 901 total)