Forum Replies Created

Viewing 15 posts - 271 through 285 (of 1,170 total)

  • RE: Trigger to update old ad new values

    Minnu (11/25/2015)


    without "old_val, new_val" trigger is working fine,want to add the old and new values to know which value is udpated to what.

    please help in query.

    Maybe this code could solve...

  • RE: Trigger to update old ad new values

    Based on the operation you can choose what to do. Inserted keeps always the new values, whereas old values are kept in deleted.

    Declare @operation char(1) SET @operation= 'N'

    IF EXISTS(SELECT *...

  • RE: Getting t-1

    Try this code

    select convert(datetime,convert(date,getdate()-1)),DATEADD(millisecond,-3,convert(datetime,DATEADD(day,1,convert(date,getdate()-1))))

  • RE: Performance on server and pc

    It seems like not updated stats are in question.

    Do you have any maintenance of the database on your PC and server?

    Is the maintenance the same on both, the indexes...

  • RE: String Compare

    What about this

    DECLARE @C NVARCHAR(10),@R NVARCHAR(10)

    SELECT @C=replace(replace(N'1 2',char(9),' '),char(13),' ')

    SELECT @R=replace(replace(N'12',char(9),' '),char(13),' ')

    SELECT ASCII(@C),ASCII(@R)

    IF @r=@C

    BEGIN

    SELECT 1

    END

    There are invisible characters in the @C variable: tab or endof line char.

  • RE: Today's Random Word!

    Ed Wagner (11/6/2015)


    anthony.green (11/6/2015)


    djj (11/6/2015)


    crookj (11/6/2015)


    Ed Wagner (11/6/2015)


    anthony.green (11/6/2015)


    Igor Micev (11/6/2015)


    CATCH

    Error

    Log

    Audit

    Account

    Bank

    Fees

    Interest

  • RE: How can I pick the IDs of all AS databases?

    This code works at my server:

    if object_id('tempdb..[#tmpASDbs]') is not null

    drop table #tmpASDbs

    create table #tmpASDbs(ASDBName nvarchar(100))

    declare @dynSql nvarchar(4000)

    set @dynSql =N'INSERT INTO #tmpASDbs(ASDBName)

    SELECT * FROM OPENQUERY(LINKED_OLAP,''SELECT [catalog_name] as [DatabaseName] FROM $SYSTEM.DBSCHEMA_CATALOGS'')'

    exec...

  • RE: Today's Random Word!

    Eirikur Eiriksson (11/6/2015)


    Igor Micev (11/6/2015)


    Igor Micev (11/6/2015)


    DonlSimpson (11/5/2015)


    Ed Wagner (11/5/2015)


    djj (11/5/2015)


    crookj (11/5/2015)


    Igor Micev (11/5/2015)


    Luis Cazares (11/5/2015)


    anthony.green (11/5/2015)


    Igor Micev (11/5/2015)


    crookj (11/5/2015)


    Ed Wagner (11/5/2015)


    anthony.green (11/5/2015)


    TomThomson (11/4/2015)


    DonlSimpson (11/4/2015)


    Weak

    frail

    Old

    Experience

    Familiarity

    Information

    Announcement

    Billboard

    City

    of Heroes

    Advengers

    Hiro Nakumura

    Hiroshima

    Bomb

    End

    TRY

    CATCH

  • RE: How can I pick the IDs of all AS databases?

    Hi,

    The following query will return the list of databases on your AS instance.

    SELECT catalog_name as [DatabaseName] FROM $SYSTEM.DBSCHEMA_CATALOGS

    You'll have to create a linked server to the AS server and call...

  • RE: Today's Random Word!

    Igor Micev (11/6/2015)


    DonlSimpson (11/5/2015)


    Ed Wagner (11/5/2015)


    djj (11/5/2015)


    crookj (11/5/2015)


    Igor Micev (11/5/2015)


    Luis Cazares (11/5/2015)


    anthony.green (11/5/2015)


    Igor Micev (11/5/2015)


    crookj (11/5/2015)


    Ed Wagner (11/5/2015)


    anthony.green (11/5/2015)


    TomThomson (11/4/2015)


    DonlSimpson (11/4/2015)


    Weak

    frail

    Old

    Experience

    Familiarity

    Information

    Announcement

    Billboard

    City

    of Heroes

    Advengers

    Hiro Nakumura

    Hiroshima

    Bomb

    End

  • RE: Today's Random Word!

    DonlSimpson (11/5/2015)


    Ed Wagner (11/5/2015)


    djj (11/5/2015)


    crookj (11/5/2015)


    Igor Micev (11/5/2015)


    Luis Cazares (11/5/2015)


    anthony.green (11/5/2015)


    Igor Micev (11/5/2015)


    crookj (11/5/2015)


    Ed Wagner (11/5/2015)


    anthony.green (11/5/2015)


    TomThomson (11/4/2015)


    DonlSimpson (11/4/2015)


    Weak

    frail

    Old

    Experience

    Familiarity

    Information

    Announcement

    Billboard

    City

    of Heroes

    Advengers

    Hiro Nakumura

    Hiroshima

    Bomb

  • RE: Today's Random Word!

    Luis Cazares (11/5/2015)


    anthony.green (11/5/2015)


    Igor Micev (11/5/2015)


    crookj (11/5/2015)


    Ed Wagner (11/5/2015)


    anthony.green (11/5/2015)


    TomThomson (11/4/2015)


    DonlSimpson (11/4/2015)


    Weak

    frail

    Old

    Experience

    Familiarity

    Information

    Announcement

    Billboard

    City

  • RE: avg disk byte reads

    river1 (11/5/2015)


    no, from 5 to 5 seconds

    ? don't understand this well,

    but however if the response time(ms) is reasonable it's normal to have spikes from time to time.

  • RE: Today's Random Word!

    crookj (11/5/2015)


    Ed Wagner (11/5/2015)


    anthony.green (11/5/2015)


    TomThomson (11/4/2015)


    DonlSimpson (11/4/2015)


    Weak

    frail

    Old

    Experience

    Familiarity

    Information

  • RE: Rebuild Indexes

    river1 (11/5/2015)


    Hi,

    If I rebuild some indexes that are above 30% of average fragmentation, should I after that update spatistics?

    Also, How can I see if I Need to update statistics^on the...

Viewing 15 posts - 271 through 285 (of 1,170 total)