Viewing 15 posts - 2,161 through 2,175 (of 3,233 total)
Nested cursors….awesome! How many hours does this take to run on your 70,000 rows? Since this is your first time here, I won’t be to...
August 8, 2007 at 3:03 pm
There is a fix for this in SP4. Are you sure you are on SP4? If so, run a DBCC CHECKDB. If it comes up with errors, fix them. If...
August 8, 2007 at 1:45 pm
Run this and then run the results from the results pane (you'll have to remove the UNION ALL clause from the last statement).
SELECT 'SELECT ' + CHAR(39) + Name +...
August 8, 2007 at 1:05 pm
No, you cannot use a CASE statement in this manner. You mentioned that you need to do this on a row-by-row basis. Does this mean that you are using a...
August 8, 2007 at 12:34 pm
Is your new server in the same domain as the older server? Have you tried droppind and recreating the user: AD\asrodrig? Try running EXEC xp_Logininfo 'AD\asrodrig' and see what you...
August 7, 2007 at 3:06 pm
The error itself is pretty straight forward. The application is attempting to insert a row and the key already exists. This leaves a couple of questions unanswered. What does...
August 7, 2007 at 2:51 pm
For starters, use Books Online and this web site. Books Online is a great SQL Server resource and contains information on many common errors such as the duplicate key error...
August 7, 2007 at 1:46 pm
Great article Andy. I would add that a professional development program should not be limited to the scope of your profession. I’m sure we’ve all heard...
August 7, 2007 at 9:25 am
I'll have to disagree here FP. I think the problem is solved. Just as Jeff said (and I said in my first post), an IDENTITY column will be required for...
August 7, 2007 at 9:00 am
DECLARE @Class TABLE (Class_ID int, Class_Date datetime, Location_ID int, Course_ID int)
DECLARE @Location TABLE (Location_ID int, Display_City varchar(50), Location_City varchar(50))
DECLARE @Course TABLE (Course_ID int, Course_Type_ID int)
SET NOCOUNT ON
INSERT INTO @Class
SELECT...
August 6, 2007 at 4:16 pm
For the jobs, just right-click on Jobs in EM and generate a SQL Script. You'll have to set your Maintenance plans up manually.
August 6, 2007 at 10:37 am
This can also be accomplished by using a numbers or tally table to ‘expand’ the groupings out. For this to work, you’ll need an Identity column...
August 6, 2007 at 10:17 am
You're welcome. As for the different approach, Set based thinking will seem different until you are used to it, at which point, procedural code will stick out like a sore...
August 3, 2007 at 11:18 am
DECLARE @Ints TABLE (value int)
SET NOCOUNT ON
INSERT INTO @Ints
SELECT '1' UNION ALL
SELECT '12'
SELECT CASE LEN(Value) WHEN 1 THEN '0' + CAST(Value as char(2)) ELSE CAST(Value as char(2)) END as...
August 2, 2007 at 2:09 pm
What datatype are you using? If INT, your out of luck as you cannot append a zero to the front end of an integer, SQL Server stores 01234 as 1234...
August 2, 2007 at 1:26 pm
Viewing 15 posts - 2,161 through 2,175 (of 3,233 total)