April 27, 2010 at 1:43 pm
So I stumbled on this command:
SELECT * FROM :: fn_trace_getinfo(default)
Yet if I remove that :: thingey the command still seems to work fine. So what is that thing?? What's it called? What's it do?? Anything???
But if I just run fn_trace_getinfo(default) I get an error.
So what do I know?
I stumbled on this command:
DBCC SQLPERF (LOGSPACE)
Cool, that works fine.
But lets say you want to do an ORDER BY [Database Name].
So I tried: DBCC SQLPERF (LOGSPACE) ORDER BY [Database Name]
Nope.
Howzabout this (like we did above): SELECT * FROM DBCC SQLPERF (LOGSPACE) ORDER BY [Database Name]
Nope.
So why not this?? SELECT * FROM :: DBCC SQLPERF (LOGSPACE) ORDER BY [Database Name]
Nope.
Hey! So why do I have to do a SELECT * FROM for the fn_trace_getinfo, and yet I just run the DBCC SQLPERF (LOGSPACE) without any SELECT statement -- it sure looks like a SELECT has been done.
And what is that :: thingey doing anyway??
Thanx!!
April 27, 2010 at 3:00 pm
HEre is a blog post that atleast might get you part of the answer
http://sqlblog.com/blogs/kalen_delaney/archive/2006/09/06/186.aspx
Dan
If only I could snap my figures and have all the correct indexes apear and the buffer clean and.... Start day dream here.
April 27, 2010 at 3:12 pm
That definitely makes it clearer... but it certainly isn't clear!
April 27, 2010 at 3:14 pm
The sad part is that is the best explanation I could find ont he subject.
Dan
If only I could snap my figures and have all the correct indexes apear and the buffer clean and.... Start day dream here.
April 27, 2010 at 9:56 pm
Scope Resolution Operator (Transact-SQL)
Another example of its use is with GRANT, REVOKE, and DENY:
Paul White
SQLPerformance.com
SQLkiwi blog
@SQL_Kiwi
April 28, 2010 at 6:30 am
Or under SSIS its a "namespace resolution operator":
..........Variables used in expressions must have unique names for the expression evaluator to evaluate the expression correctly. If a package uses multiple variables with the same name, their namespaces must be different. Integration Services provides a namespace resolution operator, consisting of two colons (::), for qualifying a variable with its namespace. For example, the following expression uses two variables named Count; one belongs to the Usernamespace and one to the MyNamespace namespace............
http://msdn.microsoft.com/en-us/library/ms140285.aspx
Or under C++
You can tell the compiler to use the global identifier rather than the local identifier by prefixing the identifier with ::, the scope resolution operator.
http://msdn.microsoft.com/en-us/library/b451xz31%28VS.80%29.aspx
Or under Visual FoxPro:
The :: operator is used to execute a parent class method from within a subclass method. When you create a subclass, the subclass methods are automatically inherited from the parent class. The :: operator makes it possible for you to execute the parent class method in the subclass method and then perform additional processing for the subclass method. The subclass definitions in the example demonstrate how the :: operator is used to execute the parent class method within a subclass method.
http://msdn.microsoft.com/en-us/library/8ehdyws9%28VS.71%29.aspx
But be careful! ...or you might run into Old Mr. BUG: CComVariant::operator=(BSTR) Does Not Copy Embedded NULL Characters
You know, where "When you assign BSTR to a CComVariant instance using CComVariant::operator=(BSTR), any characters after an embedded NULL character in BSTR are not copied."
http://support.microsoft.com/kb/251023
Now that clears things up entirely!
:hehe:
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply