Viewing 15 posts - 26,401 through 26,415 (of 26,487 total)
RGR'us,
I would rewrite your TSQL like this:
if @var_st_lev - @var_stt_amnt < 0 Then
Set @var_NSL= @var_st_lev
else
Set @var_NSL = @var_st_lev - @var_stt_amnt
Reason, each set is a single statement and...
September 7, 2006 at 10:47 am
Try this:
CREATE
FUNCTION dbo.NewStockLevel
(
@var_st_lev
int,
@var_stt_amnt
int
)
September 7, 2006 at 8:34 am
Is your database also set to compatibility mode 90 (2005)? Can you set a test database to compatibility mode 80 (2000) on a SQL 2005 server and see what happens...
August 29, 2006 at 1:25 pm
I'm curious, where in the original query did you have to add the hint to make it work as fast in 2005 as it was in 2000?
August 29, 2006 at 12:55 pm
About the depreciated part of older style joins may be true, however, that doesn't mean you shouldn't start look at rewriting queries that use the old style format. The ANSI...
August 29, 2006 at 8:33 am
Glad to help. I could probably get the query using the CTE to work, but not having any data to test, I did my best. It was looking at it...
August 28, 2006 at 1:34 pm
Not sure, but have you checked to see if you have a failed drive on the raid 5 on the slower system?
August 28, 2006 at 10:03 am
Always good to look at what one writes, as I have another solution that may also work:
SELECT
n.clientid,
n.divid,
n.contactid,
n.rolecd,
n.firstnm,
n.lastnm
FROM
csms.dbo.client_contact o
RIGHT OUTER JOIN csms.csms_mts.tmp_client_contact n
...
August 28, 2006 at 9:39 am
My bad. I think my previous post had a logic error (if someone wants to verify, I'd apreciate it). I think this is what I was trying to come up...
August 28, 2006 at 9:33 am
Hate to burst your developers bubble, but they are going to have to rewrite this query eventually. In its current format, it contains an old style inner join. This has...
August 28, 2006 at 8:21 am
Greg,
You are right, so I made a change to mine, but I'm sure some of the other solutions may be just as good:
create table dbo.Test1 (refNo varchar(10))
insert into dbo.Test1 (refNo)...
August 24, 2006 at 2:30 pm
If you are running SQL Server 2000, change the stored procedure to a scalar User-Defined function.
hth,
Lynn
August 24, 2006 at 1:42 pm
Actually, what I think what is being looked for is this:
create table dbo.Test1 (refNo varchar(10))
insert into dbo.Test1 (refNo) values ('ABC-0')
insert into dbo.Test1 (refNo) values ('ABC-1')
insert into dbo.Test1 (refNo) values ('XYZ-0')
insert...
August 24, 2006 at 10:19 am
Looking at BOL, dbcc shrinkfile truncate_only, releases unused space in the log file to the operating system, shrinking the physical size of the transaction log.
You may want to look at...
August 21, 2006 at 3:21 pm
Are you talking about the physical size of the log files, or the fact that inactive log entries are not truncated during the backup? Full and Differential backups do not...
August 21, 2006 at 2:05 pm
Viewing 15 posts - 26,401 through 26,415 (of 26,487 total)