Forum Replies Created

Viewing 15 posts - 4,411 through 4,425 (of 5,103 total)

  • RE: Query Help

    AKM,

    What the poster said was NOT what the numbers example was showing. I followed the numbers example and the post should have been the difference between the FIRST date of...

  • RE: Sargable condition slower than non-sargable...why?

    Aaron I suggested that because of the fact that you mentioned that no index was present on the searched column. Usually after statistics are updated if the column is selective...

  • RE: Sargable condition slower than non-sargable...why?

    AAron Run UPDATE STATISTICS with fullscan on your Production BOX

    Run the queries and let me know

  • RE: Query Help

    Am I missing something here?  

    what is wrong with this:

    Update o Set mynbr = datediff(d,(select min(mydate) from testt t where t.empid = o.Empid ),o.mydate)

    from...

  • RE: RAISERROR WITH NOWAIT doesnt

    Yep That's Right "Message 1" immediately, then "Message 2" five seconds later.

    Are you using QA with Results in Text ? if not, try it!

    HTH

     

  • RE: Datatype error

    The message is pretty clear TEXT VARIABLES ARE NOT ALLOWED as local variables types

    All you could use is temptables with text columns

    HTH

     

  • RE: RAISERROR WITH NOWAIT doesnt

    That works as expected on my system

    How are you testing it ? QA, VB ...

     

  • RE: largest row in a table

    dbcc showcontig( TableName&nbsp with TABLERESULTS

    and look at MaximumRecordSize

  • RE: Exists or Not Exists that is the question

    There is no right answer to that. You have to know your data. Except on some trivial situations your best bet is to check the execution plan, CPU Utilization, Indexes...

  • RE: Stored Procedures

    statements like this :

     SELECT @ReturnValue = @@ROWCOUNT

      IF (@@Error <> 0)

     will ALWAYS exectute the else part of the IF because is just checking the previous statement instead of the DML

    the correct way...

  • RE: DB Standards Reality Check

    I would add and extra answer

    B.1 BOTH (Data Administrator AND Database Administrator)

    Usually Data Administrator is more Familiar with Company Related Standards and the...

  • RE: Help with an update

    Update T

     Set profile_id = T2.profile_id

    from

      Table T

      join

     (select distinct con_id

       , profile_id

       ,  site_session_id

       From

      Table

      where Profile_id <> 0) T2

     on T.con_id =T2.con_id  and T.site_session_id =T2.site_session_id

    where T.event_type <> 27 and...

  • RE: Trigger blues...

    I would suggest using a computed column IOF trigger

     

    It is all matter of the application. Everything has pros and cons. Some times for production systems you might have to...

  • RE: convert float to string

    That should be Client side Responsibility.

    Just my opinion

     

     

  • RE: Trigger blues...

    create table Table1(

    K1 varchar(10),

    K2 BIT default 0)

    go

    create trigger tr_Table1 on Table1 after insert

    as

    begin

     Update T Set K2 = 1

     From Table1 T join inserted i on i.K1 = T.K1

    where Left(i.K1,1)...

Viewing 15 posts - 4,411 through 4,425 (of 5,103 total)