Viewing 15 posts - 22,711 through 22,725 (of 26,490 total)
longobardia (1/30/2009)
Pretty nifty query. It actually works if you change the following:
group by
tT.employeeid,
tT.TranDte
having
max(ah.updatedate) <= TranDte
)
If you run...
January 30, 2009 at 3:23 pm
Here is the code I was working with. Please see if any of it helps you out.
Edit: For some reason, I can't cut and paste code from SSMS...
January 30, 2009 at 2:48 pm
Also, I don't have an employee table or sample data. We could use that as well to help you with your query.
Be sure to include any indexes that are...
January 30, 2009 at 2:19 pm
I'm not adding any data to your sample data provided. I don't fully understand your business rules and would prefer you add the data and provide the expected results...
January 30, 2009 at 2:16 pm
longobardia (1/30/2009)
Could you explain? Please.I don't follow.
AL
If you look at your code you will see inconsistancies between column names in different parts of the code. Without looking back...
January 30, 2009 at 2:14 pm
Never mind part of my comment above. I was looking at something else while writing it. Sorry, I'm a guy and have trouble multi-tasking sometimes. BUT more...
January 30, 2009 at 2:10 pm
longobardia (1/30/2009)
select t.employeeid, t.TranDte,
dbo.udf_getHistory(t.TranDte, t.employeeid, 1) as Address1,
dbo.udf_getHistory(t.TranDte, t.employeeId, 2) as Address2,
dbo.udf_getHistory(t.TranDte, t.employeeId, 3) as City,
dbo.udf_getHistory(t.TranDte, t.employeeId, 4)...
January 30, 2009 at 2:04 pm
FYI, not everyone uses a case insensitive collation. It would be nice if your code was consistant in its use of case.
January 30, 2009 at 1:59 pm
Based on the sample data you provided, what is the expected output?
January 30, 2009 at 1:54 pm
Then you won't need the transaction log backup in the code.
January 30, 2009 at 1:47 pm
Mike Levan (1/30/2009)
when running this query does the transaction log will be free for every 100,000 recrods? I am just trying to get how this will improve performace when...
January 30, 2009 at 12:40 pm
You could try the following (in a test environment first)
declare @batchsize int;
set @batchsize = 100000; -- 100,000
while @batchsize <> 0
begin
update top (@batchsize) dbo.Rev set
...
January 30, 2009 at 11:34 am
This topic has been reposted with additional information, please go here.
Note, it would have made more sense to have added your additional info here instead of reposting.
January 30, 2009 at 11:20 am
If you are talking about adding backup log with truncate_only, please realize that option is being depreciated and may not be available in future versions of SQL Server. Again,...
January 30, 2009 at 11:14 am
The error in the title is cutoff. Could you please post the entire error message?
January 30, 2009 at 11:11 am
Viewing 15 posts - 22,711 through 22,725 (of 26,490 total)