Viewing 15 posts - 76 through 90 (of 162 total)
The performance of my code could be further improved by using a STATIC cursor. This performance gain would be most evident when the date ranges spanned multiple years since...
February 11, 2003 at 8:24 am
well0549,
I do not believe that I said your code would not work. The reason I made the comment regarding SQL2000 was that abhi_develops's initial post states that this has...
February 11, 2003 at 8:06 am
Minor correction to my code, the line below....
while @Counter < len(@Calender)
...should read......
while @Counter <= len(@Calender)
....sorry abhi_develops
February 11, 2003 at 7:46 am
.....if a temp table, just look at all that IO!!!
February 11, 2003 at 7:38 am
well0549 your solution will only work for SQL2000 and I have no idea which version abhi_develops is currently using.
Everyone seems to be knocking how this data is stored but thinking...
February 11, 2003 at 7:31 am
Here is another way to do it which looks a bit simpler.
declare @StartDate datetime,
@EndDate datetime
set @StartDate = '20030115'
set @EndDate = '20030120'
declare@Year int,
@Calender char(372),
@PreDays int,
@PostDays int,
@WorkingDays int,
@NonWorkingDays int,
@DummyDays int,
@Counter int,
@Day char(1)
set...
February 11, 2003 at 6:11 am
Having re-read your initial post I think that what you are trying to acheive is a join between the tables which subject to the value in the PriceCodeID field (which...
February 10, 2003 at 3:13 am
Do you have a fixed number of PriceCodeID's which you wish to pivot or can the number of values vary.
The manner in which a pivot is achieved will vary considerably...
February 10, 2003 at 2:07 am
Dont you just love it when someone takes two other peoples ideas and makes a better one from combining them.
February 6, 2003 at 8:54 am
This is not quite as short as DavidT's but it is an alternative way of approaching the issue.
select dateadd(hh, (convert(bigint, @eftv_dt) % 1000000) / 10000, dateadd(mi, (convert(bigint, @eftv_dt) % 10000)...
February 6, 2003 at 8:42 am
Presuming that your fldDate field is actually a datetime field and is unique you can use the following.
selectfldDate,
fldTrxType,
fldAmount,
(select sum(convert(money, case when fldTrxType = 'Withdrawal' then -1 else 1 end) *...
February 6, 2003 at 2:43 am
Apologies, I recall now that I used the StrConv function and created a VBComponent which I then called from VBScript.
It worked, but was slow. Sorry.
February 6, 2003 at 2:27 am
Can you clarify what you are aiming to achieve from your trigger since it is usual to make use of the Inserted, Deleted tables within the trigger.
February 4, 2003 at 2:33 am
There is no native method of doing this in SQL Server.
You could however create a DTS package which processed the data in your tables using the following VBScript command.
StrConv(strValue, vbProperCase)
...
January 30, 2003 at 2:40 am
Viewing 15 posts - 76 through 90 (of 162 total)