File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help me to translate this query oracle to sql server

 
ravi sahil
Greenhorn
Posts: 4
  • 0
  • 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: 20369
44
Chrome Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
DatePart can easily give you the week number.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic