Viewing 15 posts - 3,841 through 3,855 (of 4,033 total)
Also, the format that you're looking for in the CONVERT is 112, which gives you YYYYMMDD without the need to use REPLACE to get rid of extraneous characters.
SELECT Convert(varchar(8), Getdate(),...
September 2, 2010 at 1:23 pm
Jim-720070 (9/2/2010)
September 2, 2010 at 1:12 pm
Depending on the number of tables and the types of updates, replication may actually be your best option. SSIS is going to have a hard time dealing with deletes,...
September 2, 2010 at 6:29 am
A conditional expression can't appear in your THEN clause. The generic way to fix this is to move it to the WHERE clause with an AND.
WHERE CASE
...
September 1, 2010 at 6:53 am
Matt Miller (#4) (8/30/2010)
Actually - compile errors (which I believe is what you'd get if you try to insert into a column that doesn't exist)
Actually, that's a runtime error. ...
August 31, 2010 at 6:30 am
Arjun Sivadasan (8/31/2010)
August 31, 2010 at 6:18 am
I think he's inserting into a temp table, then deleting from the temp table, and then inserting the remaining records into the production table.
If that is the case, you might...
August 30, 2010 at 11:31 am
Arjun Sivadasan (8/30/2010)
August 30, 2010 at 11:17 am
Brandie Tarvin (8/30/2010)
August 30, 2010 at 11:07 am
Your pseudo-code doesn't have an explicit transaction defined and you didn't mention whether you had changed your transaction management mode, so I'm assuming that it's using the default which is...
August 27, 2010 at 3:15 pm
WayneS (8/27/2010)
drew.allen (8/27/2010)
You may want to SET ROWCOUNT instead of using a TOP PERCENT.SET ROWCOUNT is on the deprecated list. Use TOP (n) instead.
I only suggested SET ROWCOUNT because I...
August 27, 2010 at 12:34 pm
Actually, I was thinking about this last night, and because of the number of records you may want to do batch the processing. Here's one example. You would...
August 27, 2010 at 8:29 am
I tend to use FOR XML to concatenate values together. In some cases, you can also use the quirky update.
Here is the FOR XML version.
if object_id('tempdb..#test') is not null...
August 26, 2010 at 8:58 pm
If you want to return fields that you don't want to group on, a CTE with Row_Number() is often a good approach.
I changed your Table to a Table variable, but...
August 26, 2010 at 8:14 pm
SwePeso (8/25/2010)
DECLARE@Sample TABLE
(
ID INT NOT NULL
)
INSERT@Sample
SELECT 1 UNION ALL
SELECT 2 UNION ALL
SELECT 3 UNION ALL
SELECT 4 UNION ALL
SELECT 6 UNION ALL
SELECT 7 UNION ALL
SELECT 9 UNION ALL
SELECT11
-- Get the missing...
August 25, 2010 at 4:22 pm
Viewing 15 posts - 3,841 through 3,855 (of 4,033 total)