Skip to content

[log].[wall]

Problemy

  • Uzupelneinie oldvalue

Przykladowe wywolanie

SQL
1
2
3
4
5
6
7
;EXEC [log].[wall_List_inline]
@PageIndex = '1',
@remoteID = null,
@remoteSource = 'planlistlastactivity_simple' ,
@username = 'm.kotynia',
@dateStart = null,
@dateEnd = null

Problem polega na braku wypelnienia oldValue trzeba by to uzupelnic nastepnie

SQL
1
2
3
4
    update  [log].[wall] set isvaluechange =
        case when cast([newValue] as nvarchar(MAX))!= cast([oldValue] as nvarchar(MAX))  then 1
        else 0 end
    where isvaluechange is null

Przyklad wywoalnai z planu

SQL
1
2
3
4
5
6
7
8
9
  ;EXEC [log].[wall_List_inline]
@PageIndex = '1',
@remoteID = null,
@remoteSource = 'planlistlastactivity_simple'
                        ,
@username = 'm.kotynia',
@dateStart = null,
@dateEnd = null
/**/

Potencjalne przyspieszenie

Duzo zapisow gdzie remoteid is null

SQL
select top 1000 * from  log.wall  where remoteid is null
order by adddate desc