Viewing 15 posts - 12,766 through 12,780 (of 14,953 total)
Best solution for this kind of this is to build a calendar table.
Workdays between two dates isn't the same as datediff(day), because it doesn't count weekends or holidays. The...
July 17, 2008 at 9:42 am
From a DBA point of view, I'd go with multiple procs, no master proc. From a "make life easy on the devs" point of view, I'd go with the...
July 17, 2008 at 9:31 am
If you want to know why it works that way, take a look at the article on ANSI_Padding in Books Online. Tells you exactly why and how it works.
July 17, 2008 at 9:25 am
Take a look at "SQL Server Agent Fixed Database Roles" in Books Online. That should give you what you need to fix this.
July 17, 2008 at 9:22 am
Someguy (7/17/2008)
I once heard someone ask the question: "How much time to you spend at your job vs how much time do you spend at home?" ....
Heck, I'm often still...
July 17, 2008 at 9:14 am
I answered "Indeterminate", based on the same data that Hugo wrote up. I understand the point of the question and its answer, but this is a limited-case scenario.
July 17, 2008 at 7:54 am
You might check to see if the PK is the clustered index, and what level of fragmentation it's sitting at if so.
You might also check to see if the table...
July 16, 2008 at 1:14 pm
The second IF checks if the column exists, and only runs if it doesn't. How is code supposed to alter a non-existent column? Change the comparison to >...
July 16, 2008 at 1:03 pm
Nope. That comes from me editing (I changed some stuff for clarity) after I tested. It's a typo. (Par for the course today. I try to...
July 16, 2008 at 12:33 pm
DKG (7/16/2008)
July 16, 2008 at 12:24 pm
Makes sense. (I didn't actually click through the link, because I kind of overlooked it in my overenthusiam for testing.)
On the original test table, with 1-million rows, that nested...
July 16, 2008 at 11:22 am
Create a staging table that has the columns, but no constraints/indexes on it. Then clean up the data (remove the duplicate) and insert...select into the table with the constraints.
July 16, 2008 at 11:00 am
You can grand execute rights on every proc in a database, but I don't know how to grant execute rights to every proc in every database on a server, except...
July 16, 2008 at 10:58 am
RyanRandall (7/16/2008)
GSquared, your last idea also cropped up in 2002...
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=21511
REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(colname,
...
July 16, 2008 at 10:52 am
Does the account SQL Agent is running under have the necessary rights to execute sp_send_dbmail? How about the account the job is running under (if that's different)?
July 16, 2008 at 10:37 am
Viewing 15 posts - 12,766 through 12,780 (of 14,953 total)