Viewing 15 posts - 1,276 through 1,290 (of 1,314 total)
I once found some VB6 code on the web somewhere that ran T-SQL batches across selected databases on all available servers. It got left behind a job or two ago,...
May 13, 2004 at 8:11 am
I can't believe I had to get to page 2 before finding somebody noticed the script only worked for dbo tables.
The script also assumes no tables have embedded spaces or...
May 13, 2004 at 7:28 am
This code is not a complete solution but might do you some good. It takes the text definition of all views and strips out character strings and comments, then...
December 15, 2003 at 10:39 pm
An improvement to your LPAD function would be to replace the WHILE loop with
IF LEN(@InString) < @PadLength
SET @InString = REPLICATE(@PadChar, @PadLength - LEN(@InString))
(But I'd go with sql_servant's...
December 9, 2003 at 2:08 pm
You say nothing happens when you click on Query Analyzer. Did you check that what you clicked on actually links to isqlw.exe, and it doesn't have any extra command...
December 5, 2003 at 8:48 am
It's probably so obvious that you forgot to mention it, but you have to be careful to only use the left join method when at least one side of the...
December 5, 2003 at 8:11 am
You don't say anything about the quality of the name fields. If they're clean, the PARSENAME function is a great approach.
I work with a lot of crappy name &...
November 17, 2003 at 3:26 pm
We have to use a VPN to connect to a remote system to download data, then upload it to a local server.
The VPN client software closes all other ports while...
November 17, 2003 at 2:53 pm
The cases I've looked at worked best when all optional parameters were non-null, and timed out when some parameters were null, so I meant it the way I wrote it....
September 26, 2003 at 12:12 pm
I can't explain what's going on in the UDF, but I can state emphatically that you should avoid "WHERE (@p is NULL or field = @p)" in stored procedures. ...
September 26, 2003 at 9:58 am
I didn't realize parts of the query would be turned into emoticons.
The big green question mark icons ( ) in the above queries should be a...
September 10, 2003 at 8:21 am
Here's a query I came up with:
exec sp_MSforeachdb 'select ''?'' as DB, u.name as Orphan
from .dbo.sysusers u where u.islogin = 1 and u.sid > 0x01
and...
September 10, 2003 at 8:18 am
You have to look at the execution plans before making assumptions about the efficiency of different approaches.
Just because you repeat a calculation several times does not mean it will have...
September 3, 2003 at 7:55 am
If you want the name of the table along with the trigger name:
select tbl.name as TABLE_NAME, trg.name as TRIGGER_NAME
from sysobjects trg
inner join syscomments sc on sc.id = trg.id
inner join sysobjects...
August 31, 2003 at 7:26 am
If your table name might be part of another table name, you could use a more selective LIKE pattern:
select so.name
from sysobjects so
inner join syscomments sc on sc.id = so.id
where so.xtype...
August 31, 2003 at 7:15 am
Viewing 15 posts - 1,276 through 1,290 (of 1,314 total)