Forum Replies Created

Viewing 15 posts - 6,721 through 6,735 (of 7,472 total)

  • RE: convert varchar to decimal

    actualy I guess it is a rounded value (...6667)

    You might also consider float-datatype

    set nocount on

    create...

  • RE: convert varchar to decimal

    you might try this :

    set nocount on

    create table #t1 (col1 varchar(100) not null, col2 decimal(8,2) null)

    insert into #t1 (col1) values ('.0366666666666666666666666666666666666667')

    select * from #t1

    update #t1

    set col2 = convert(decimal(8,2),substring(col1,1,CHARINDEX (...

  • RE: SQL Performance Issue

    Check dbcc spaceused, to find out the index-statistics for your table/index.

    dbcc dbreindex yourtable will optimize spaceusage of your table when you'r using a clustered index.

    sp_updatestats, dbcc updateusage may help to...

  • RE: A bit stuck... xpert help needed! Joins and unions etc...

    Is this what you mean ?

    -- Begin Tran

    -- update T

    -- set end_date = MEdt.MaxEndDate

    select T.*

    , MEdt.MaxEndDate

    , Mmog.Maxmemberofgroup

    from mytable T

    inner join

    (

    select person_id ,max( end_date ) as MaxEndDate

    from mytable

    group by person_id

    )...

  • RE: There''''s GOTTA Be a Better Way!

    ... (repeat 80,000 times).... 

    with waitfor delay '00:01:00' ? 

    Adjust the set rowcount ***

    select dateadd(mi,80000,getdate()) - getdate()

    results :

  • RE: There''''s GOTTA Be a Better Way!

    set rowcount 100

    declare @ctr as int

    declare @TOTctr as int

    select @ctr = 1, @TOTctr = 0

    while @ctr > 0

    begin

        delete from history_log where event_date < '1/8/05'

        set @ctr = @@rowcount

        set @TOTctr...

  • RE: Server Crash

    If you have reinstalled exactly to the situation like before the crash, then you can just copy all mdf, ldf, ndf files (also master and msdb if you have kept...

  • RE: Kill without Rollback?

    - Logical dataconsistancy is a user problem.

    - Physical dataconsistancy is a sqlserver problem ! This means a transaction is OK or it must...

  • RE: Help in joining three tables for COUNT

    Is this executed on a sql2000 sp3a multiproc box ?

    If yes : did you install the hotfix for count(*)  ?

    Microsoft Knowledge Base article number Q814509

    "FIX: A Parallel Query with a...

  • RE: Kill without Rollback?

    No, because then you would have inconsistend data !

  • RE: rescheduling sql job

    keep in mind the security restrictions for job-alters. Don't run your app with sa-permissions!

    declare @NewDate as int

    declare @NewTime as integer

    declare @dtNewTime as datetime

    -- wait for 45 minutes

    set @dtNewTime = dateadd(mi,45,getdate())

    select...

  • RE: Not Returning any records using CONTAINSTABLE

    did you create a full-text-index ?

  • RE: Clean up indexes.

    - Are your stats up to date ? (can you execute sp_updatestats / dbcc updateusage )

    - I'd start off with all indexes which have a minor filter ratio (cardinality).

    - you...

  • RE: memory

    can you post the DDL for the table and the view so we can see what might be goin wrong ?

     

  • RE: Frank''''s Addition to Family

    Don't ask for my picture, WWF may might just publish me as "endangered species"

    My Girls are 40  ...

Viewing 15 posts - 6,721 through 6,735 (of 7,472 total)