Viewing 15 posts - 91 through 105 (of 105 total)
I just threw this together so I'm not sure how sound the logic is but you can make a UDF out of the following code (w/ a weekend skipping parameter):
declare...
October 26, 2006 at 8:11 am
Something like this:
select
HasIndex=case when idx.id is null then 0 else 1 end,
TableName=tbl.name,
IndexName=isnull(idx.name, '*** No Indexes ***')
from sysobjects tbl
left join (select *...
October 24, 2006 at 2:34 pm
I once ran some tests and determined that this should work (it can probably be cleaned up):
declare @sourcedate datetime, @newdatefirst tinyint
select @sourcedate=getdate(), @newdatefirst = 7
select dayoftheweek=((datepart(dw, @sourcedate) + @@DATEFIRST...
October 24, 2006 at 11:49 am
It might turn out to be somehow related but I'm still not sure why the Order By should combine with the Select Into to produce this effect.
If someone has an...
October 22, 2006 at 10:45 am
Okay. I was thinking about an old problem I had before some changes were made a while back. I thought the issue still carried over into the example I posted...
October 20, 2006 at 2:08 pm
Okay. I can't seem to reproduce this behavior in query analyzer.
October 20, 2006 at 1:46 pm
No.
I meant the dual behavior.
In my stored procedure, when I try:
Insert Into ... Select ..., null From ...
I get a different result than when I...
October 20, 2006 at 1:30 pm
October 17, 2006 at 12:55 pm
Yeah. I overthought the issue. After a quick scan of the question, I figured that he wanted to know how to automate the renaming of a view.
October 12, 2006 at 6:43 am
Apparently, this is a known feature
http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q243198
it also happens when using: exec sp_rename 'OriginalName', 'NewName', 'OBJECT'
You MAY be able to script your own procedures to workaround this but if...
October 11, 2006 at 1:32 pm
If it is a storedprocedure being called then you can modify it to quietly insert a line into a log table with the login/user/machine/datetime info. If the query involves updates,...
October 10, 2006 at 3:54 pm
That assumes that the Column_Name field doesn't allow null values otherwise, I believe, if the value does happen to be null setting the @Param_Name to null won't "eliminate" it. Null...
October 10, 2006 at 8:38 am
--Brute force? (Mind the mess, now)
create table #list1(server_nm varchar(7))
create table #list2(server_nm varchar(7))
create table #list3(server_nm varchar(7))
create table #list4(server_nm varchar(7))
create table #list5(server_nm varchar(7))
create table #list6(server_nm varchar(7))
insert into #list1 values('Server1')
insert into #list1 values('Server2')
insert...
September 13, 2006 at 3:57 pm
Thanks. That's a lot cleaner.
I must have latched onto the first idea that made sense and coded it into submission.
July 3, 2006 at 3:21 pm
I threw this together when I first saw the article (Missed the "One Year Ago:" part of the message.)
I used a pretty messy approach:
November 21, 2005 at 10:36 am
Viewing 15 posts - 91 through 105 (of 105 total)