Viewing 15 posts - 901 through 915 (of 1,082 total)
That means you trying to create a trigger on a table called [New_Budget] and that doesn't exists.
Is your table not called debit?
Thanks
Chris
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
June 4, 2008 at 7:44 am
HI There,
CREATE DROP TRIGGER [trg_Debit_U]
ON [Debit] FOR INSERT
AS
UPDATE
SET CurrentBalance = BeginningBalance - [Sum].Amount
FROM Budget
INNER JOIN (SELECT SUM(Amount) as [Amount],BudgetID FROM Budget GROUP BY BudgetID) [Sum]
ON .BudgetId...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
June 4, 2008 at 7:27 am
I also had to sit down for a bit on this one 😉
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
June 4, 2008 at 7:05 am
Hi,
A good place to start would be to read up about the INSERTEd,DELETED tables that are created when an update/insert/delete trigger fires.
Cause once you understand those tables you will beable...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
June 4, 2008 at 7:04 am
HI,
Are you sure you VARCHAR value is a correct numeric value to be converted to a decimal?
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
June 3, 2008 at 7:22 am
Hi,
I hope I'm not missing anything.
But if the column doesn't allow nulls and the error is saying cannot insert null, then I'm going to go with the fact that someone...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
June 2, 2008 at 9:22 am
HI there,
I agree, SSC is one of the best sites for advice and learning that I have come across 🙂
Don't be scared fail be excited to learn 😉
thanks
Chris
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
June 2, 2008 at 9:21 am
HI,
Unless I am missing the problem.
A simple left join to a tally table with an is null clause in the where should always return the missing numbers in your table.
Unless...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
June 2, 2008 at 7:14 am
VERY nice Matt,
I like that query 🙂
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
May 29, 2008 at 10:27 am
HI,
Let me have a look at it , I'm pretty sure you don't need to access every row one by one to get the multiple sets.
I'll get back to you...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
May 29, 2008 at 10:11 am
HI again,
To be honest I would be very interested to see if you could return multiple result sets without a loop or a recursive call to function/Proc or multiple select...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
May 29, 2008 at 9:52 am
Hi there,
Do you want this in multiple result sets?
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
May 29, 2008 at 9:45 am
Hi,
Not sure if this is normal.
I have never used a cursor in my life 🙂 (very happy about that)
Do you have to use a cursor for this problem?
Thanks
Chris
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
May 29, 2008 at 9:13 am
hi,
Use something like this.
DELETE
FROM T1
WHERE ID IN
(SELECT [1].ID
FROM T1 [1] INNER JOIN T2 [2] ON [2].ID = [1].ID)
Your Select would be in the Where clause and should...
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
May 29, 2008 at 8:07 am
Hi again,
I think I might have worked this out.
The Scan count and Logical Reads are far great when using the INFORMATION_SCHEMA as apposed to the sys tables.
----------------------------------------------
Try to learn something about everything and everything about something. - Thomas Henry Huxley
:w00t:
Posting Best Practices[/url]
Numbers / Tally Tables[/url]
May 28, 2008 at 5:43 am
Viewing 15 posts - 901 through 915 (of 1,082 total)