Forum Replies Created

Viewing 15 posts - 91 through 105 (of 105 total)

  • RE: datediff part2

    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...

  • RE: INDEX question SQL Server 2000

    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 *...

  • RE: Day of the week

    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...

  • RE: Null Timestamp

    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...

  • RE: Null Timestamp

    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...

  • RE: Null Timestamp

    Okay. I can't seem to reproduce this behavior in query analyzer.

  • RE: Null Timestamp

    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...

  • RE: insert the value to the temp table

    Looks like you also need to put @quiz in quotes

    set @sql= @sql+ ' AND quizname = '''+ @quiz + ''''

  • RE: Renaming a view

    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.

  • RE: Renaming a view

    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...

  • RE: How to know when a Query is running

    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,...

  • RE: Self Eliminated Parameters

    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...

  • RE: Recon Database design HELP (newbie alert)

    --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...

  • RE: Permission-LIKE bit fields (Aggregate Woes)

    Thanks. That's a lot cleaner.

    I must have latched onto the first idea that made sense and coded it into submission.

  • RE: Bowling Challenge - The Results

    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:

    CREATE PROCEDURE GetScores( @GameID int,

Viewing 15 posts - 91 through 105 (of 105 total)