Quiz — Reserved words


System reserved words

System reserved words begin with ss. All of them deal with date values. The offsets are all in relation to today. These words are used usually on the where clause or in expressions or in manual SQL dictionary words.

   Synonyms
   Examples

 

Reserved word Description
ss.begcurweek    where date1 >= ss.begcurweek
begin of current week (Sunday)
ss.begmon    where date1 >= ss.begmon
begin of current month
ss.begmonth    where date1 >= ss.begmonth “5”
   where date2 = ss.begmonth “-2”
date1 = begin of current month plus 5 months.
date2 = begin of current month minus 2 months.
ss.begnxtmon    where date1 < ss.begnxtmon
begin of next month
ss.begnxtweek    where date1 < ss.begnxtweek
begin of next week
ss.begprvmon    where date1 >= ss.begprvmon
begin of previous month
ss.begprvweek    where date1 >= ss.begprvweek
begin of previous week (Sunday)
ss.begweek    where date1 < ss.begweek “2”
   where date2 >= ss.begweek “-8”
date1 = begin of current week plus 2 weeks.
date2 = begin of current week  minus 8 weeks.
ss.begyear    where date1 < ss.begyear “1”
   where date2 >= ss.begyear “-2”
date1 = begin of current year plus 1 year.
date2 = begin of current year minus 2 years.
ss.days    where date1 <= ss.days “60”
   where date2 >= ss.days “-30”
date1 = today plus 60 days.
date2 = today minus 30 days.
ss.endmon    where date1 <= ss.endmon
last day of current month
ss.endmonth    where date1 <= ss.endmonth “+5”
   where date2 > ss.endmonth “-2”
date1 = end of current month plus 5 months.
date2 = end of current month minus 2 months.
ss.endnxtmon    where date1 <= ss.endnxtmon
last day of next month
ss.endnxtweek    where date1 <= ss.endnxtweek
end of next week (Saturday)
ss.endprvmon    where date1 >  ss.endprvmon
last day of previous month
ss.endprvweek    where date1 <= ss.endprvweek
end of previous week (Saturday)
ss.endweek    where date1 <= ss.endweek “+2”
   where date2 <= ss.endweek “-8”
date1 = end of current week plus 2 weeks.
date2 = end of current week minus 8 weeks.
ss.endyear    where date1 <= ss.endyear “+1”
   where date2  <= ss.endyear “-2”
date1 = end of current year plus 1 year.
date2 = end of current year minus 2 years.
ss.months    where date1 <= ss.months“+24”
   where date2 >= ss.begyear “-36”
date1 = today plus 24 months.
date2 = today minus 36 months.
ss.sysdte
   today
   where date1 = ss.sysdte
today

 

  Page 1 — Quiz words
  Page 2 — Operators
  Page 3 — Where words
  Page 4 — Print words
  Page 5 — Sort words
  Page 6 — Chart words
  Page 7 — Expression words
  Page 8 — System words
  Page 9 — Global words

Next – Global words >

Leave a Reply