Viewing 15 posts - 7,441 through 7,455 (of 7,631 total)
This script article has a view that is both accurate and avoids using cursors: http://www.sqlservercentral.com/scripts/tables/62545/
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
March 19, 2008 at 2:40 pm
Like this:
SELECT * INTO ##tmpTbl FROM OPENQUERY(TEST, 'SELECT
[Test 1] AS Test1, [Test 2] AS Test2,[Sum of' + @month +'] AS MonthlyAmount FROM [TESTfor sheet1$]')
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
March 19, 2008 at 2:07 pm
Here's one way:
Imports Microsoft.SqlServer
Imports Microsoft.SqlServer.Management
Imports Microsoft.SqlServer.Management.Common
Imports Microsoft.SqlServer.Management.Smo
Imports Microsoft.SqlServer.Server
Imports system.Data
Module Util
Public Sub Servers_List(ByVal lstOut As IList)
Dim rss As RegisteredServers.RegisteredServerCollection...
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
March 19, 2008 at 1:19 pm
Because it doesn't work like. Follow Grant's advice and lookup "Dynamic SQL".
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
March 19, 2008 at 1:17 pm
Grant Fritchey (3/19/2008)
The default installation of AdventureWorks is case sensitive.
Really Grant? Wow! I did not know that. Good to know now though, thanks.
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
March 19, 2008 at 1:08 pm
I am going to guess that the [font="Courier New"]WAITFOR DELAY[/font] is only there to make testing this case easier (I have done this before) and is not normally there.
I am...
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
March 19, 2008 at 12:57 pm
I have seen something like this a couple of times before. Both times it was related to the syntax of the [font="Courier New"]DELETE[/font] statement.
Here is how you typically delete...
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
March 19, 2008 at 12:32 pm
Alter is much better.
As the previous poster noted, it keeps the permissions settings. Plus it's faster and much better at preserving/repairing the dependencies.
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
March 19, 2008 at 12:08 pm
Huh. Good point Gogula (great name, my compliments to your parents). I was in grid mode and didn't notice it.
Looking through the optimizer, it appeared to me that...
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
March 19, 2008 at 12:02 pm
Try this:
Create procedure Get_All_Details( @Category_ID int )
as
begin
select
Users.FirstName, Users.LastName, Users.UserName, Category.Category_Name, Category.Start_Date, Category.End_Date,
Employees.Company_ID, Employees.Name, Employees.Salary
from
Users, Category, Employees,
...
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
March 19, 2008 at 12:15 am
Looks like a bug to me.
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
March 19, 2008 at 12:06 am
No, SQL Server Browser is a service that tells clients what instances are available and where they are.
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
March 18, 2008 at 9:32 pm
I think that you might also be missing a plus sign ("+") between these two lines:
'and'+ '('+ 't.trantype=''T'''+ 'or t.trantype=''D'''+')'
'and(t.trandate>='+@@FortnightEndDate-13+'and t.trandate=' + @@FortnightEndDate +')'
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
March 18, 2008 at 7:24 pm
Lynn Pettis (3/18/2008)
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
March 18, 2008 at 4:45 pm
Wow, that's an awful lot of heat for giving a one line answer to 2 or 3 day old question.
Seriously though, I cannot see why I should judge a whole...
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
March 18, 2008 at 4:22 pm
Viewing 15 posts - 7,441 through 7,455 (of 7,631 total)