Viewing 15 posts - 5,101 through 5,115 (of 5,588 total)
There are a couple of other actions that sp_change_users_login can use besides report... these just happen to fix the orphaned user. Check out BOL for the procedure.
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
July 2, 2009 at 4:59 pm
While reading through this thread, it dawned on me that this is something that I failed to check on with my new job. 🙁
Is there a way to tell...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
July 2, 2009 at 1:24 pm
Nag (7/2/2009)
'+ @dbname +' as Databasename,
Nag, (cute tag...)
change this to:
'+ QuoteName(@dbname, char(39)) +' as Databasename,
That should resolve your issue.
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
July 2, 2009 at 7:31 am
The only time a new row will be placed in any kind of order is if you have a clustered index on the table. Then it will place the new...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
July 2, 2009 at 7:26 am
Pretty much. I can't think of any other way; perhaps someone else will pipe in with an alternate suggestion.
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
July 2, 2009 at 7:11 am
only4mithunc (7/1/2009)
Is there any way to make the column name dynamic in SQL 2005 ? The situation is in a select statement there is one case statement , based...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
July 1, 2009 at 3:52 pm
Thank you for posting your solution.
To answer your first question (how to avoid putting name in the group by), you can use an aggregrate function on the name in the...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
July 1, 2009 at 3:41 pm
mtassin (7/1/2009)
say something like this..
select * from addressinfo
where
contains(address1,'"*red*"')
I'd expect it to find words that begin with red such as redding, redbird, redmond, etc... as well as just the...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
July 1, 2009 at 3:37 pm
Lynn Pettis (7/1/2009)
I need you to give me a script that will automagically determine what records to delete from unspecified tables.I mean really, you want fries with that too?
Just in...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
July 1, 2009 at 3:33 pm
Do you think that this poster is the same one we had earlier that deleted all of his posts?
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
July 1, 2009 at 3:28 pm
raghu,
May I ask why you felt it necessary to delete your initial post? The problem you were having may be useful to someone else; without your problem description they would...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
July 1, 2009 at 3:27 pm
JALB (7/1/2009)
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
July 1, 2009 at 10:44 am
Dave,
Here's a solution that eliminates the dynamic sql.
-- declare and set the looping variables
DECLARE @Count INT, @Month INT
SET @Count = 1
SET @Month = 5
-- build a table to hold the...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
July 1, 2009 at 9:23 am
Dave, you are actually pretty close.
Instead of using EXEC(), use sp_executesql. This will allow you to pass in the appropriate parameter also - see BOL for how to do this.
In...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
July 1, 2009 at 8:36 am
Dave Ballantyne (7/1/2009)
My personal option would be
DECLARE @Date1 DATETIME, @Date2 DATETIME, @Date3 DATETIME, @Date4 DATETIMESET @Date1 = '1991/06/01'
SET @Date2 = '1991/06/29'
SET @Date3 = '1991/08/01'
SET @Date4 = '1991/09/04'
;with CteDates(Dates) as
This...
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
July 1, 2009 at 8:32 am
Viewing 15 posts - 5,101 through 5,115 (of 5,588 total)