Viewing 15 posts - 61 through 75 (of 173 total)
Suggestions:
1 confirm that all of the left joins are left joins (not innner)
2 set WorkOutlet as an inner join instead of , workoutlet and handled in the where
...
July 22, 2008 at 6:01 pm
Dynamic sql is an option (one timer).
create a cursor to loop through your columns (in sql2005 the cursor would reference information_schema.columns)
@aSql = 'update mytable set ' + @aColumn + '...
July 22, 2008 at 5:13 pm
I haven't tested it but with the +7 & modulo against a monday (1/1/1900) it would appear to me to be independent of DATEFIRST type database property changes.
btw: LOVE...
July 15, 2008 at 4:09 pm
just because...
DECLARE @aCurrentDate DATETIME
SET @aCurrentDate = GETDATE()
SELECT DATEADD(dd, -(DATEPART(weekday, @aCurrentDate)+7 - DATEPART(weekday, '1/1/1900'))%7, @aCurrentDate)
July 15, 2008 at 3:18 pm
If the update is the only action...
set the recoverytype to simple (set back after execution)
good luck
Daryl
June 23, 2008 at 4:32 pm
Magic bullet!
If you can update the recovery type.
Backup database.
Set recoverytype to simple
task-shrink-file-log (note: do not shrink to almost nothing, sql just has to recreate.
set recoverytype to full
add backing...
June 23, 2008 at 4:30 pm
--insert the results into an import table.
insert into import_dump_results (id, val)
....
-- insert valid date results into final
insert into dump_result (id, val)
select id, val
from import_dump_results
where isdate(left(val,22)) = 1
-- update val for...
June 23, 2008 at 4:20 pm
If you have the option (access). It can speed up the process to set the recovery type to Simple.
Then script a while loop that updates the top 10k? 100k?...
June 23, 2008 at 4:09 pm
Have you thought about a view?
Within a view you can have derived tables, unions, cte's etc...
In one of my apps I have a view that gives me default and custom...
June 23, 2008 at 4:02 pm
A- meaningful table names will almost always save effort at the time or later in maintenance.
B- do not worry about a left join. You are only updating the consultants...
April 3, 2008 at 9:02 am
I would try to identify the consultants and their points for one month. Then create a calendar table to cross reference salestype dates to identify numbers to months.
1. ...
April 2, 2008 at 10:23 am
Shot in the dark, but if the query analyzer has updated stats... ?
sp_MSForEachTable "UPDATE STATISTICS ? with fullscan"
Warning.... update stats can take a bit of time...
Daryl
December 4, 2007 at 3:56 pm
The source (3rd party app usage) sql server is 2000. The warehouse is 2005.
I have not looked into log shipping, will investigate.
thanks for the new direction.
daryl
November 29, 2007 at 1:39 pm
The original database ( and logical) name is FTDB. I went for a more informational name for the replicated copy.
thanks
November 29, 2007 at 9:55 am
Another option besides clearing cache is updating the table and index statistics.
I have had similar problems. Runs fine in SSMS and not from a web request. ...
November 29, 2007 at 8:32 am
Viewing 15 posts - 61 through 75 (of 173 total)