Viewing 15 posts - 6,211 through 6,225 (of 7,608 total)
You'd have to use an INSTEAD OF trigger, naturally. Those are a pain to write and maintain, since you must write code yourself to complete the modification -- DELETE...
March 6, 2014 at 5:34 pm
Yes, the logging especially will be take a lot of time.
But, it will be much more bearable if:
1) the child tables are clustered properly (as usual!), i.e., starting with...
March 6, 2014 at 5:28 pm
I'd definitely add a bit column to the table. Your data and your statements seem contradictory, but I think when a new row is added that becomes current, you...
March 6, 2014 at 5:11 pm
MyDoggieJessie (3/6/2014)
DECLARE @Err INTBEGIN TRY
BEGIN TRANSACTION
<A whole bunch...
March 6, 2014 at 5:06 pm
If the original amount is odd, add 1 cent to the first joint account holder. That will work regardless of the number of joint account holders:
select cast(original_amount/2 +
...
March 6, 2014 at 4:33 pm
The core thing is not to skimp on the design. It may look 'leaner' to just leave out some relationship tables, or to combine some relationship tables, but doing...
March 5, 2014 at 10:11 am
halifaxdal (2/21/2014)
ScottPletcher (2/21/2014)
SELECT
Owner, CAST(YEAR(Quarter) AS char(4)) + 'Q' + CAST(DATENAME(QUARTER,...
February 24, 2014 at 8:29 am
I, too, got different totals; mine add up to 82, the number of sample rows of data.
SELECT
Owner, CAST(YEAR(Quarter) AS char(4)) + 'Q' + CAST(DATENAME(QUARTER, Quarter) AS...
February 21, 2014 at 4:50 pm
Maybe this?!:
SELECT
t1.DOCUMENT_NO,
RTRIM(CAST(t1."ENVIRONMENT_CD" AS VARCHAR(5))) + '*' + RTRIM(CAST(t1."ORDER_NO" AS VARCHAR(25)))
+ CASE WHEN TEST_REPORTING_MATERIAL_SID__COUNT > 1 THEN...
February 20, 2014 at 3:11 pm
The "ON" clause after the "FROM" is not valid. That condition should just be in the WHERE conditions, since it's a correlated condition.
I don't know about Netezza, but the...
February 20, 2014 at 3:04 pm
Instead of the overhead of a self-join, try this for case #3:
WHERE
myField LIKE '_%' + @SearchParameter + '%' AND
CHARINDEX(@SearchParameter, myField) >...
February 20, 2014 at 2:58 pm
A "heap" is a table without a clustered index. It may or may not have nonclustered indexes.
You should review heaps carefully. Typically it's far better in SQL Server...
February 19, 2014 at 12:27 pm
Here's my suggested code for this trigger.
CREATE TRIGGER [dbo].[MAYTABLE_A_IUD_WD]
ON [dbo].[MYTABLE]
AFTER DELETE, INSERT, UPDATE
AS
SET NOCOUNT ON;
DECLARE @action char(6)
...
February 19, 2014 at 12:20 pm
Please try code below. I didn't have any data to test it first, of course.
SELECT
a.ValetNO AS PlanNo,
cross_apply_1.Status1,
...
February 14, 2014 at 4:00 pm
Viewing 15 posts - 6,211 through 6,225 (of 7,608 total)