Viewing 15 posts - 481 through 495 (of 1,478 total)
When you use the procedure sp_msforeachdb, it loops through the databases, but it is still being run from the database that you are connected to, so it will run you...
--------------------------------------------------------------
To know how to ask questions and increase the chances of getting asnwers:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
April 8, 2011 at 8:27 am
I don't think that cursors are evil. I do think that cursors are being misused a lot and this is what gave them there reputation. You have to...
--------------------------------------------------------------
To know how to ask questions and increase the chances of getting asnwers:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
April 8, 2011 at 8:18 am
Here is one more way:
select
tbl.col.value('(../@name)[1]','varchar(10)'),
tbl.col.value('@name','varchar(10)'),
tbl.col.value('@value', 'int')
from @xmlData.nodes('registry/k/k/v') tbl (col)
Adi
--------------------------------------------------------------
To know how to ask questions and increase the chances of getting asnwers:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
April 6, 2011 at 8:04 am
Like John wrote in his replay you can query sys.sql_modules, but don't forget that you might miss some views. For example if the view checks the value of empid,...
--------------------------------------------------------------
To know how to ask questions and increase the chances of getting asnwers:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
April 6, 2011 at 7:29 am
You have 2 choices. The first choice is to use Unicode instead of ASCII (e.g. nvarchar or nchar instead of varchar or char). If you use Unicode,...
--------------------------------------------------------------
To know how to ask questions and increase the chances of getting asnwers:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
February 8, 2011 at 1:14 am
Are you sure that the problem with your tempdb was caused by the code that you posted? Don’t forget that a different code can use most of the tempdb’s...
--------------------------------------------------------------
To know how to ask questions and increase the chances of getting asnwers:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
February 7, 2011 at 6:47 am
You can check the GMT time (with GETUTCDATE() function) and then add 2 hours to it (to get the local time at Israel). The problem is that this calculation...
--------------------------------------------------------------
To know how to ask questions and increase the chances of getting asnwers:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
February 7, 2011 at 5:17 am
You can find the reason in this URL – http://msdn.microsoft.com/en-us/library/ms178050.aspx. If you don’t specify the column’s source in the subquery, it will first try look for it in...
--------------------------------------------------------------
To know how to ask questions and increase the chances of getting asnwers:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
February 1, 2011 at 6:36 am
As far as I know the only things that you should check is that the table exists on your default schema and that you have permissions to work with this...
--------------------------------------------------------------
To know how to ask questions and increase the chances of getting asnwers:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
January 31, 2011 at 6:11 am
You can create a computed column that does it. When you create a computed column you don't have to specify its data type and you use the key word...
--------------------------------------------------------------
To know how to ask questions and increase the chances of getting asnwers:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
January 31, 2011 at 6:04 am
It should work. I’ve just tested it with the script bellow. Do you have the problem when you run the select statement from a SSMS window or do...
--------------------------------------------------------------
To know how to ask questions and increase the chances of getting asnwers:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
January 31, 2011 at 4:16 am
Are you sure that this is the default schema? Can you check if this is the really the user’s default schema with this query?
select default_schema_name
from sys.database_principals
where name = 'WriteUserNameHere'
Adi
--------------------------------------------------------------
To know how to ask questions and increase the chances of getting asnwers:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
January 31, 2011 at 3:20 am
You have to use the schema’s name and put apostrophes around it (e.g. ‘Risk.TableA’). If it really bothers you, you can try writing your own procedure that will be...
--------------------------------------------------------------
To know how to ask questions and increase the chances of getting asnwers:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
January 31, 2011 at 2:48 am
You are missing the table’s schema in your query. If you didn’t work with schemas then most chances are that the schema name is dbo (which means that the...
--------------------------------------------------------------
To know how to ask questions and increase the chances of getting asnwers:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
January 30, 2011 at 9:03 am
You don’t need to give name for the join of the derived table. Bellow you can see a version that gets compiled. I think that you should...
--------------------------------------------------------------
To know how to ask questions and increase the chances of getting asnwers:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
January 30, 2011 at 8:54 am
Viewing 15 posts - 481 through 495 (of 1,478 total)