Forum Replies Created

Viewing 15 posts - 301 through 315 (of 363 total)

  • RE: UNION problem

    This example does NOT deal with all of your criteria, but just provided to show a point. If a "Constant" evaluation in a WHERE clause evaluates to FALSE, SQL Server...



    Once you understand the BITs, all the pieces come together

  • RE: Updating Table

    How about...

     
    
    Select LatestNonBOs.ID_Field, LatestNonBOs.MaxBeginDate
    From (Select ID_Field, Max(BeginDate) as MaxBeginDate
    from EntryVal
    Where HType <> 'BO'
    Group by ID_Field) LatestNonBOs...



    Once you understand the BITs, all the pieces come together

  • RE: Troublesome query

    Depending on your data...

    Something like this maybe....

    select a.PostId, a.PostDate, a.PostTitle, Count(b.ReplyId) As ReplyCount, 
    
    Sum( Case When c.ReplyId is NULL Then 0Else 1...



    Once you understand the BITs, all the pieces come together

  • RE: Sum the MAX

    Matt, something like...

     
    
    SELECT Terminal, Key_month_end, SUM(num_units)
    FROM active_Units_Static A
    JOIN (
    SELECT Terminal, MAX(month_end) as Key_month_end
    FROM active_Units_Static
    where month_end >= '1/1/2002'...



    Once you understand the BITs, all the pieces come together

  • RE: convert ss to hh:mm:ss in SQL

    Try something like...

    Declare @Diff DateTime

    Select @Diff = Finished - Start

    select @Diff, DateName(dy, @Diff - 1) + ':' + Convert(VarChar(10), @Diff, 14)



    Once you understand the BITs, all the pieces come together

  • RE: concatenation of Records

     
    
    -- For one record at a time...
    Declare @MessData Varchar(8000)
    Set @MessData = ''

    Select @MessData = @MessData + ' ' + Rtrim(Notes) ...



    Once you understand the BITs, all the pieces come together

  • RE: Help! Delete operation is VERY SLOW

    I've had luck putting the "keys" into a temp table, then deleting in a seperate command...

    Select mbrshp, gst_prof 
    
    Into #Temp
    From changes
    Where...



    Once you understand the BITs, all the pieces come together

  • RE: Need to break large text field into rows

    How about....

     
    
    CREATE VIEW dbo.MyView AS
    SELECT TOP 100 PERCENT
    ID,
    SpliceNumber,
    BigTextSplice,...



    Once you understand the BITs, all the pieces come together

  • RE: Very minor web site spelling "mistake"

    Same thing at http://www.sqlservercentral.com/Scripts/



    Once you understand the BITs, all the pieces come together

  • RE: LTRIM/RTRIM NOT TRIMMING

    Can you post the results of

     
    
    select TOP 1 '-' + ltrim(rtrim(org_name)) + '-'
    from tableA?

    Might also have some unprintable or CR/LF...



    Once you understand the BITs, all the pieces come together

  • RE: help with UPDATE SELECT statement

    I'm not an Oracle guy, so I do not completely understand what the posted statement is supposed to do. Can you post your two TSQL Update statements?



    Once you understand the BITs, all the pieces come together

  • RE: Join using one col as a Regular Expression

    Since A.ID must remain unique, I ask whether there can exist multiple records in B for a single record in A (given your "join" criteria)? If Not , then something...



    Once you understand the BITs, all the pieces come together

  • RE: Email whenever anyone replies to this topic

    FYI, On my end, the subscriptions seem to work for a little while just after I un-subscribe, then re-subscribe.

    Like david, I also check the "notify by email" checkbox...



    Once you understand the BITs, all the pieces come together

  • RE: BULK INSERT - Identity values not in sequence

    The physical sequence is important because I have to parse thru the .TXT "data file" that contains a multiple of different sub sections & parent followed by child records.



    Once you understand the BITs, all the pieces come together

  • RE: Advanced T-SQL

    1. What is the Max(DataLength()) you would be dealing with?

    2. Is the data CR/LF delimited, or other delimiter?

    3. Is there any guarantee that the ending 8000 characters of...



    Once you understand the BITs, all the pieces come together

Viewing 15 posts - 301 through 315 (of 363 total)