wood burning stoves
The moose likes JDBC and Relational Databases 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 Head First Android this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
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: 20048
    
  30

DatePart can easily give you the week number.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Help me to translate this query oracle to sql server
 
It's not a secret anymore!