Viewing 15 posts - 3,451 through 3,465 (of 6,036 total)
Using a relational database would make things a lot more easier...
😉
_____________
Code for TallyGenerator
October 17, 2007 at 5:29 am
Mike,
unfortunately there is no such thing as "CROSS APPLY" in MS SQL 2000.
_____________
Code for TallyGenerator
October 17, 2007 at 4:15 am
Create a trace job which will secretly populate some secret table with data from master.dbo.sysprocesses where program_name = 'MS SQLEM ...
_____________
Code for TallyGenerator
October 16, 2007 at 11:00 pm
I did not dig into it but I noticed that DatabaseName and ObjectName don't work for some reason. Probably they don't work in some cases, I don't know, was never...
_____________
Code for TallyGenerator
October 16, 2007 at 10:35 pm
First of all - trigger is a stored procedure. It's just invoked in a different way.
Look in "CREATE TRIGGER" topic in BOL if you don't believe me.
🙂
"Trigger-less solution" means just...
_____________
Code for TallyGenerator
October 16, 2007 at 9:45 pm
Ronald San Juan (10/15/2007)
Yep... as I said, no need for the trigger.
As well as "Flag" columns, and most of those 25 columns, and that overnight job selecting records for emailing.
"Send...
_____________
Code for TallyGenerator
October 16, 2007 at 7:53 pm
Ronald,
look closer.
What we've got.
There are 3 "Flag" columns. And there is some job which updates those flags anyway.
And there is a trigger which captures updates and sends emails.
So, easiest and...
_____________
Code for TallyGenerator
October 15, 2007 at 9:13 pm
CREATE VIEW LargeOrderShippers
AS
SELECT S.CompanyName, O.OrderID, O.Freight
FROM Shippers AS S
INNER JOIN...
_____________
Code for TallyGenerator
October 15, 2007 at 7:41 pm
Mike C (10/15/2007)
Something like this should do the trick, using [font="Courier New"]CROSS APPLY[/font]:
Yes, but not in SQL2000.
Table function approach is just wrong for this.
You need a value per line of...
_____________
Code for TallyGenerator
October 15, 2007 at 7:37 pm
Lowell (10/15/2007)
Sergiy (10/15/2007)
You need trigger to populate that table.
i disagree that a trigger is needed; part of the scheduled job should be doing a query like this:
select * from tbltest...
_____________
Code for TallyGenerator
October 15, 2007 at 7:20 pm
You need trigger to populate that table.
_____________
Code for TallyGenerator
October 15, 2007 at 5:18 pm
It's easy 😉 :
SELECT A1.DocID
FROM TableA A1
LEFT JOIN TableA A2 ON A1.DocID = A2.DocID AND A2.DocType = 'EmpID'
WHERE A2.DocID IS NULL
GROUP BY A1.DocID
_____________
Code for TallyGenerator
October 15, 2007 at 4:13 pm
Lester Policarpio (10/14/2007)
i think i can remove the URL in my script.
And you can look for hints inside other system procedures.
Wisdom comes from there.
:Wow:
_____________
Code for TallyGenerator
October 15, 2007 at 2:26 am
That script is not actually originated from that forum.
It's from the text of system procedure sp_change_users_login:
[font="Courier New"] -- HANDLE REPORT --
if upper(@Action) =...
_____________
Code for TallyGenerator
October 14, 2007 at 9:53 pm
What if procedure returns multiple recordsets? Which one you wanna see?
What if procedure does not return any recordset?
What if only result it returns is an output parameter?
_____________
Code for TallyGenerator
October 12, 2007 at 2:43 pm
Viewing 15 posts - 3,451 through 3,465 (of 6,036 total)