Viewing 15 posts - 106 through 120 (of 476 total)
Two great ideas Jeff, thanks.
Jeff Moden (11/4/2015)
That notwithstanding and depending on the change, I may backup separate tables using SELECT INTO to copy the data to a "safe" database
We do...
November 4, 2015 at 6:42 am
mbaldock (11/4/2015)
but there are no database objects referenced by the function!
My understanding is that you get a better performing Query Plan (no SPOOL) if you use SCHEMABINDING.
November 4, 2015 at 5:50 am
If you want other columns, from the row that has the next most recent date, then:
select TOP 1 Col1, Col2, ...
FROM @tempdat
where repdate < @StartDate
ORDER BY repdate DESC, OtherTieBreakColumn1,...
November 4, 2015 at 5:11 am
In case of interest we always Alias the table-being-updated as "U" so that we know which table, ina multi-JOIN-query, is the target:
UPDATE [highlight="#ffff11"]U[/highlight]
SET SizeList = x.SizeList
FROM targettable[highlight="#ffff11"] AS U[/highlight]
INNER...
November 3, 2015 at 9:38 am
DamianC (11/3/2015)
In this instance, I need to know the code that causes the issue
If you log the database extensions then would the time at which they occur tell you which...
November 3, 2015 at 9:14 am
Could you change the delete process so that just the PKey of the row, to be deleted, is stored in a new "ToBeDeleted" table, and then physically delete them out-of-hours?
Depends...
November 3, 2015 at 9:09 am
Jshapiro 32900 (11/3/2015)
November 3, 2015 at 8:24 am
This perhaps?
select
*
from
customer c
WHERE NOT EXISTS
(
SELECT*
FROMlogs l
WHERE l.custid = c.id
AND l.checked >= DATEADD(day,-90,getdate())
)
November 2, 2015 at 8:58 am
When we do this we use a BATCH file (I'm an old dog ... presumably PowerShell would be the modern equivalent).
My BATCH file would do BCP and then RAR/whatever. It...
November 2, 2015 at 8:50 am
Sergiy (11/1/2015)
As for database backups - I don't think there is a place for it in the current world.
How do you handle a fraud investigation with no backups?
Lets say company...
November 2, 2015 at 8:43 am
We need to disable triggers on some tables when we bulk-import data (in FKey order)
ALTER TABLE dbo.MyTable DISABLE TRIGGER ALL
...
ALTER TABLE dbo.MyTable ENABLE TRIGGER ALL
November 2, 2015 at 1:10 am
Jeff Moden (11/1/2015)
At work, we don't allow the use of 3 or 4 part naming conventions anywhere except in the synonyms themselves and it has worked out extraordinarily well.
I could...
November 2, 2015 at 1:03 am
GonnaCatchIT (11/1/2015)
[Our DB size is 450 GB. Does copy DB copy the data as well or only the database objects.]
Sorry, poor use of terminology, by "copy-database" I meant a database...
November 2, 2015 at 12:56 am
Out of interest when I register on a new site (and can be bothered, but in particular where security is important to me) I do a Lost Password Request. It...
November 1, 2015 at 3:59 am
Viewing 15 posts - 106 through 120 (of 476 total)