Viewing 15 posts - 4,606 through 4,620 (of 7,187 total)
Do you not have direct access to the system you're inserting rows in? I think it would be a lot more transparent, not to mention maintainable, to have your...
March 21, 2012 at 9:18 am
It's not just a performance thing either. Once you have a script working, you can reuse it as many times as necessary, and you can easily promote changes through...
March 21, 2012 at 9:15 am
GuruGPrasad (3/21/2012)
select val.day,SUM(V.data) from val V join val Val on V.day<=val.day group by val.day,val.day
That'll work well for three rows, but will get more and more inefficient the more rows...
March 21, 2012 at 3:34 am
Tony
Search this site (or the internet) for "running totals", then have a try at writing something. Post back if there's anything you don't understand.
John
March 21, 2012 at 3:29 am
Roust_m (3/21/2012)
Because when you buy a licence, you buy...
March 21, 2012 at 2:44 am
If I remember correctly, you have to license every processor that the operating system has access to. (That's how it was in previous versions - please correct me if...
March 20, 2012 at 2:51 am
You probably need to read about JOINs. No need for row-by-row processing, and much quicker.
John
March 16, 2012 at 7:01 am
In a way, stored procedure do keep it simple. It's much easier to change code in a database than it is to change it in an SSIS package. ...
March 16, 2012 at 6:59 am
Why do you want to fetch the values one by one instead of as a set? What are you going to do with them?
John
March 16, 2012 at 6:50 am
Are there any parts of the SQL that are constant? You could put those into stored procedures that accept parameters. That way, your SQL string will be shorter...
March 16, 2012 at 6:48 am
Are you building the code and then executing it in an Execute SQL task? That's the simplest way, and, as far as I know, it isn't subject to any...
March 16, 2012 at 5:26 am
What version of SQL Server are you using? I think the 4000 character limit only applies in 2000 and below.
John
March 16, 2012 at 5:18 am
Does this not work?
IF NOT EXISTS (
SELECT * FROM sys.key_constraints
WHERE type = 'PK'
AND OBJECT_NAME(parent_object_id) = 'Algorithm_Literals'
)...
John
March 15, 2012 at 6:02 am
Surely it's easier just to DENY UPDATE to all users? Obviously db_owners and sysadmins will still be able to do updates - that may or may not be an...
March 14, 2012 at 7:54 am
Something like this?
UPDATE item
SET taxid = 1
WHERE id IN (SELECT id FROM Inserted)
You can't - or at least shouldn't - have user input in a trigger. If users need...
March 12, 2012 at 8:54 am
Viewing 15 posts - 4,606 through 4,620 (of 7,187 total)