Viewing 14 posts - 1 through 15 (of 15 total)
The article implies that logic to maintain integrity should not reside in the database. I couldn't disagree more. You either put logic in the database, or you clean garbage out. It's...
Brian
MCDBA, MCSE+I, Master CNE
August 23, 2005 at 1:24 am
Remi:
Using a permanent table instead of a temporary table to hold the information is a bad idea for a couple of reasons. First, it is much more difficult to support multiple users...
Brian
MCDBA, MCSE+I, Master CNE
June 16, 2005 at 12:15 pm
The temporary table method works fine from both ado and ado.net.
You create a temporary table by executing a "CREATE TABLE #tableName" statement from the connection object in ADO. On the...
Brian
MCDBA, MCSE+I, Master CNE
June 16, 2005 at 12:05 pm
You're going to need a loop, and if you have multiple rows, a cursor to fetch through the rows.
For each row, first replace every LF with CR
SET @value = REPLACE(@value, CHAR(10),...
Brian
MCDBA, MCSE+I, Master CNE
June 15, 2005 at 8:15 pm
I learned many years ago not to completely trust any other developer. A stored procedure could be called by another application written by another developer. It only costs a few extra...
Brian
MCDBA, MCSE+I, Master CNE
June 15, 2005 at 2:08 pm
You can pass a temporary table to a stored procedure. Just create the temp table and populate it before you call the sp, and drop it after you've executed it. That's...
Brian
MCDBA, MCSE+I, Master CNE
June 15, 2005 at 12:26 pm
In order to do that, you must ensure that you are using set-based operations in the triggers. If you must use a cursor, use an INSTEAD OF INSERT trigger and...
Brian
MCDBA, MCSE+I, Master CNE
June 15, 2005 at 11:15 am
Be careful when using this UPDATE syntax. Make sure you always specify OPTION(MAXDOP 1). I've been burned in the past. Another problem is that you cannot specify an ORDER BY clause...
Brian
MCDBA, MCSE+I, Master CNE
June 11, 2005 at 9:19 pm
Here's a quick and dirty example of how to select the result of dynamic sql into a variable. You need to wrap the sql statement in a temporary stored procedure...
Brian
MCDBA, MCSE+I, Master CNE
June 10, 2005 at 8:50 pm
I ran into the same kind of error. It turned out that the query I sent it was just too much for poor SQL Server 2000 SP4. I called Microsoft...
Brian
MCDBA, MCSE+I, Master CNE
June 10, 2005 at 7:04 pm
Look up KB296642.
Brian
MCDBA, MCSE+I, Master CNE
June 10, 2005 at 10:30 am
Why don't you try an instead of update trigger? Replace the MODIFIED_DATE with GETDATE() in the UPDATE statement. Since the instead of update eliminates one of the update statements, the deadlocks should...
Brian
MCDBA, MCSE+I, Master CNE
June 7, 2005 at 8:25 pm
OOPS! You're right, it should be / 5) * 5
Brian
MCDBA, MCSE+I, Master CNE
June 7, 2005 at 6:34 am
Assuming that your table is like:
CREATE TABLE temperatures
(
TempTime DATETIME NOT NULL,
Tempurature FLOAT NOT NULL
)
Here's your query:
SELECT [Hour], CAST(StartingInterval AS CHAR(2)) + '-' + CAST(StartingInterval + 4 AS CHAR(2)) AS interval,...
Brian
MCDBA, MCSE+I, Master CNE
June 6, 2005 at 7:12 pm
Viewing 14 posts - 1 through 15 (of 15 total)