Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help me to translate this query oracle to sql server

 
ravi sahil
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Help me to translate this query oracle to sql server

TRUNC ((ST.ARRIVAL_END_DTTM - NEXT_DAY (TRUNC (ST.ARRIVAL_END_DTTM, 'YY') - 7, 'MONDAY')) / 7,0) + 1 AS WEEK
 
Rob Spoor
Sheriff
Pie
Posts: 20669
65
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
DatePart can easily give you the week number.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic