Forum Replies Created

Viewing 15 posts - 301 through 315 (of 362 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...

  • 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...
  • 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...
  • 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'...
  • 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)

  • RE: concatenation of Records

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

    Select @MessData = @MessData + ' ' + Rtrim(Notes) ...
  • 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...
  • RE: Need to break large text field into rows

    How about....

     
    
    CREATE VIEW dbo.MyView AS
    SELECT TOP 100 PERCENT
    ID,
    SpliceNumber,
    BigTextSplice,...
  • 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...

  • 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?

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

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

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

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

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