Skip to content

Instantly share code, notes, and snippets.

@swaters86
Created September 19, 2014 20:33
Show Gist options
  • Save swaters86/d1d3e34bf763699075ab to your computer and use it in GitHub Desktop.
Save swaters86/d1d3e34bf763699075ab to your computer and use it in GitHub Desktop.
select count (*)
--update aa
--set aa.Sist_endret = cast(aa.dato as datetime),
aa.Opprettet = cast(aa.dato as datetime)
from web.dbo.Artikkler_hode aa
left join web.dbo.Artikkler_status (nolock) bb
on (bb.Avis =aa.Avis and bb.Dato=aa.Dato and bb.Kategori=aa.Kategori and bb.Lopenr=aa.Lopenr)
where bb.Avis='DA' and bb.CreatedBy='mfxfeeder' and convert(varchar(8), aa.Opprettet, 112) > aa.dato
and aa.Dato <> '99999999'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment