Forum Replies Created

Viewing 15 posts - 271 through 285 (of 461 total)

  • RE: Removing Time from Date

    Frank,

    You are right. I've forgotten this behavior

    I've corrected this:

    update Mytable

    set DateCol = Cast(DateCol-0.5 as int)

    Bye

    Gabor

  • RE: Removing Time from Date

    And what about this:

    update Mytable

    set DateCol = Cast(DateCol as int)

    The idea is the remove the fraction part (hh:mm:ss:nnn) and only keep the integer part (the days)

    Bye

    Gabor

  • RE: How to TEST if statistics should be updated.

    I have would have an another approach.

    For me in a small db of 80 MB a query of 30 sec or even minutes is inimaginable. Something must be wrong out...

  • RE: how to Swap records

    You are absolutly right.

    But you know here we are trying to show the way and the howtos to solve some specific problems.

    Anyway you have brought a valid point, a transaction...

  • RE: JOIN VS CORRELATED SUBQUERIES

    Join is definitly your choice.

    In your specifique example join is used the most efficiently.

    The second example you've brought cannot work because you want to bring in a single column a...

  • RE: A concatenated field or multiple fileds

    If you really want to assure the uniqueness of your 12 columns beside your primary key I'm afrad the only way is a unique contraint (which is a unique index...

  • RE: Rules of thumb-perceptible changes in performance

    I agree to SeekQuel.

    in a typical OLTP environment having 100% degradation of a query which normally performing at 10 ms and now at 20 ms is not noticeable by the...

  • RE: Which Index Is Beter as Clustered ?

    If you really have only single row record retrievals (no range select, no sort)

    then it doeasn't make too many sense to create a clustered index.

    Non clustered index will remain faster...

  • RE: how to Swap records

    declare @Column4 varchar(50), @Column5 varchar(50)

    select @Column4 = Column4,

    @Column5 = Column5

    from MyTable

    where id = 1

    Update MyTable

    set Column4 =...

  • RE: String Aggregate Function

    Here is an another approach:

    create table #temp(Id int, Name char(3))

    create table #temp2 (Id int, Name varchar(50))

    insert into #temp values(1, 'Abc')

    insert into #temp values(1, 'xyz')

    insert into #temp values(1, 'PQr')

    insert into #temp...

  • RE: Dynamic Evaluation

    It is not so easy.

    You have to make a parser (like lex and yacc).

    The basic idea is to search for the numbers and the operands.

    Here is the beginning what you...

  • RE: Cursors as output parameters??

    See BOL:

    quote:


    E. Use an OUTPUT cursor parameter

    OUTPUT cursor parameters are used to pass a cursor that is local to a...

  • RE: Removing Time from Date

    I still belive that the convert is the most efficient way to remove the time part as it uses the less function calls

    update Mytable

    set DateCol = convert(datetime,...

  • RE: how to Swap records

    If I've understood well you want to change the order of the columns in your index.

    To do this first drop the index (alter table drop constraint...) and recreate it with...

  • RE: How to determine the ideal amount of memoria to sq

    Really it depends on your applications.

    If your databases are not big, then it doesn't make sense give more RAM as your databases sizes are (+256 MB for Windows)

    If you are...

Viewing 15 posts - 271 through 285 (of 461 total)