wood burning stoves*
The moose likes JDBC and the fly likes Help me to translate this query oracle to sql server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Help me to translate this query oracle to sql server" Watch "Help me to translate this query oracle to sql server" New topic
Author

Help me to translate this query oracle to sql server

ravi sahil
Greenhorn

Joined: May 07, 2013
Posts: 4
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

Joined: Oct 27, 2005
Posts: 19679
    
  18

DatePart can easily give you the week number.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Help me to translate this query oracle to sql server