Forum Replies Created

Viewing 15 posts - 2,431 through 2,445 (of 6,486 total)

  • RE: Climb Another Mountain - Database Weekly (Oct 13, 2008)

    All right - I will bite. What IS it going to be? The other news I hear about involving Kilimanjaro portray it as being SQL 11, just that...

  • RE: before insert trigger equivalent

    You can implement functionality like a BEFORE trigger using SQL Server's INSTEAD OF triggers. The main difference is that the BEFORE trigger will go ahead and do the insert,...

  • RE: Concatenate many rows in one row

    If you just want them in any old order, then it's fairly easy:

    declare @fun varchar(4000)

    set @fun='';

    select @fun= @fun+','+cast(ID as varchar(20)) from employees

    select @fun

    If you need to concatenate in a specific...

  • RE: Optimizing a Stored Procedure

    rbarryyoung (10/10/2008)


    tendayit (10/10/2008)


    I added the SET NOCOUNT ON line as someone was saying that it missing was causing the problem.

    You may need to move the corresponding SET NOCOUNT OFF to...

  • RE: Select * from second column ?

    Now that I reread that - you want all BUT the first column? You then might need to use what I initially gave you and just build the dynamic...

  • RE: Select * from second column ?

    You're making contradictory statements. I understand you don't know the column name, but selecting only one column and selecting all columns are conflicting requirements.

    In addition - if your first...

  • RE: Insert and Update

    CrazyMan (10/10/2008)


    I need to make the 2 SQL statements into one, is'nt there a MERGE statement on SQL 2005 🙂

    Just put them both in a single transaction. Commit only...

  • RE: Help needed with a CASE

    The correlated sub-queries still bother me - but even with leaving them in - you have an extra reference to the ptEncounter in there I don't think you need:

    select...

  • RE: Select *

    Jeff Moden (10/9/2008)


    That would grab /*__*/ if it's on the same line as some code of embedded within a statement.

    right! Didn't think of that one....

  • RE: Select *

    Jeff Moden (10/9/2008)


    Vincent Central (10/9/2008)


    Who said developers have full access to production? Doing a select * only takes read access.

    Thank you all for your replies. I have "coached" the offending...

  • RE: 'N' number of usage - Tally Table

    If a good delimiter is that hard to pick up front, then first scan the file to make sure if there are any thorns in the data. If need...

  • RE: CSI -are they for real?

    rbarryyoung (10/9/2008)


    Well here's one hint: There is no computer program in the world that can take a grainy .1 megapixel bank camera photo and turn it into a stunning...

  • RE: 'N' number of usage - Tally Table

    Sergiy (10/9/2008)


    Matt Miller (10/8/2008)


    I would have said CLR, but then again - Sergiy might start foaming at the mouth....:)

    Why should I?

    (just poking fun a little - I know you're...

  • RE: Dense_Rank Challenging

    The running total solution is described here:

    http://www.sqlservercentral.com/articles/Advanced+Querying/61716/%5B/url%5D

  • RE: Dense_Rank Challenging

    you're dense-ranking by hour? How about -

    select *,

    dense_rank() over (order by dateadd(hour,datediff(hour,0,startdatetime),0))

    from #FinalValues

    Hmm - never mind - sounds like something entirely...

Viewing 15 posts - 2,431 through 2,445 (of 6,486 total)