Guest User

Untitled

a guest
Apr 20th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
T-SQL 0.47 KB | None | 0 0
  1. select  cs_code
  2.     ,cs_pkkey
  3. from    tbl_costs
  4. where   (
  5.         (cs_date >= convert(datetime,'20111205') and cs_dateend <= convert(datetime,'20111205'))
  6.     or  (cs_date >= convert(datetime,'20111205') and cs_date <= convert(datetime,'20111205'))
  7.     or  (cs_dateend <= convert(datetime,'20111205') and cs_dateend >= convert(datetime,'20111205'))
  8.     or  (cs_date <= convert(datetime,'20111205') and cs_dateend >= convert(datetime,'20111205'))
  9.         )
  10. and     cs_pkkey = 3619
  11. and     cs_prkey = 1051
Add Comment
Please, Sign In to add comment