Viewing 15 posts - 271 through 285 (of 358 total)
It is not process intensive. Many people use sp_who2 to get a quick view of what is going on on the server. This is by no means a...
July 10, 2008 at 5:16 pm
Here is a vbscript that will give you a list of all services and the state. Save the file as a .vbs and run it. You can modify...
July 10, 2008 at 1:55 pm
Brad McGehee has a great ebook. There are two books in the download and one of them is DBA Best Practices and goes over daily activities.
http://www.red-gate.com/products/SQL_Backup/offers/brad_exceptional_dba_ebook.htm
July 10, 2008 at 8:06 am
Let me know if this makes any sense.
Declare @STR varchar(20)
Set @STR = 'T3es5ta12p001'
--This is what we are trying to duplicate
select Substring(@str,11,3)
Select len(@str) LengthOfString,
...
July 10, 2008 at 6:54 am
I am seeing this done a lot using xml path. I have not done a lot of tests, but I hear it is more efficient.
declare @test-2 table...
July 9, 2008 at 7:35 am
I think this will do whay you want.
Declare @STR varchar(20)
Set @STR = 'T3es5ta12p001'
select Substring(@str,len(@str)-PATINDEX('%[A-Z]%',reverse(@str))+2,len(@str))
July 8, 2008 at 5:19 am
You cannot trick sql into thinking that is a column name. You would have to use some form of dynamic sql and then execute it.
example.
declare @sql varchar(8000)
Set...
July 7, 2008 at 10:14 pm
I am not sure why Mickael's solution will not work. If it is a datetime value the comparison should work. To get your original query to work you...
July 7, 2008 at 2:29 pm
john.arnott (7/7/2008)
I suppose there are always multiple ways to skin a cat, but I wonder what advantage you see in using "Sum(1)" rather than "Count(*)" in your query....
July 7, 2008 at 1:43 pm
You can generate a restore script using the system tables.
I dug this out of my scripts, I think this will do it.
USE master
--get the database name and database...
July 7, 2008 at 10:55 am
If all you need it for is documentation purposes, I use the system tables and output the data in an html format. If someone asks for a data dictionary,...
July 7, 2008 at 10:41 am
Good one Jeff. They will need to create the "Tally" table you have in the example.
July 7, 2008 at 8:25 am
There is no easy funtion to do this, but here is a thread on the topic with a few solutions.
http://www.eggheadcafe.com/software/aspnet/32567710/replace-all-alpabet-chara.aspx
If the numbers are always at the end you...
July 6, 2008 at 3:49 pm
I am not sure what your query looks like, but based on the sample data the query should be pretty efficient. The SUM(1) will return an incremented value for...
July 5, 2008 at 9:29 pm
Viewing 15 posts - 271 through 285 (of 358 total)