Viewing 15 posts - 6,856 through 6,870 (of 14,953 total)
This is how I do that kind of thing:
SELECT 1
WHILE @@rowcount > 0
DELETE TOP (10000) FROM table1;
The initial "select 1" sets the @@rowcount to 1, then it keeps deleting as...
March 18, 2010 at 9:21 am
Whoever is saying they're incompatible simply hasn't read the relevant data in BOL.
Encrypted data compresses significantly less than equivalent unencrypted data. If transparent data encryption is used to encrypt an...
March 18, 2010 at 9:16 am
I looked for a way to do that years ago. Gave up on it. I find convering the recordset to HTML using the XML query method to be...
March 18, 2010 at 9:11 am
Could be. I don't think I've ever used SQL on a single-core machine, so maybe that's why I'm used to seeing wrong numbers.
March 18, 2010 at 9:10 am
Is the SQL Agent service running?
Do you have the necessary server-level permissions to view job data?
March 18, 2010 at 9:09 am
I'd keep at least the name in the dataset:
SELECT *, loginproperty(name, 'passwordLastSetTime')
FROM sys.sql_logins AS SL
WHERE is_policy_checked = 1
AND is_expiration_checked = 1
ORDER BY name;
March 18, 2010 at 9:06 am
There are a couple of ways to do that in SQL 2005. The easiest is send a list of delimited values, and use a string-parsing routine to split it...
March 18, 2010 at 8:50 am
Write a dynamic SQL script that will allow you to do so. Here's a simple example:
DECLARE @sql NVARCHAR(MAX);
SELECT @sql = 'CREATE PROC Test1
@StartDate DateTime = NULL,
@EndDate DateTime = NULL
AS
BEGIN
SET...
March 18, 2010 at 8:46 am
When I open the plan, I get 11%, 39%, 25%, 1%, and 0%, for each sub-query, which adds up to 76%, which is obviously just as wrong, but in the...
March 18, 2010 at 8:39 am
Then you'll need to use a different deployment method.
I would generally not include the same proc in multiple databases. I have a database called "Common" where I store that...
March 18, 2010 at 8:34 am
The normalized tables look okay.
The way I usually do that kind of thing is use the Output clause to tie the ID values from the new tables back to the...
March 18, 2010 at 8:32 am
It's probably a question of string building. False has single-quotes around it that are probably breaking the dynamic SQL.
Try replacing that with a 0 (assuming it's a bit field),...
March 18, 2010 at 8:25 am
If I remember correctly, I solved that once by rebooting.
March 18, 2010 at 8:21 am
The problem isn't the Insert. It's the final Select.
select * from #ordertest order by EffectiveDate, LoadOrder, WorkOrderNum
should be:
select * from #ordertest order by EffectiveDate, LoadOrder, WorkOrderNum, ID
or:
select...
March 18, 2010 at 8:20 am
Now all we need is the orcish (Dark Speech) for "cursor"...
March 18, 2010 at 7:24 am
Viewing 15 posts - 6,856 through 6,870 (of 14,953 total)