File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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: 19543
    
  16

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Help me to translate this query oracle to sql server
 
Similar Threads
Problem with Hibernate Query
Code to trigger nightly batch job works .. but I don't know why it works
sqlException : "Invalid scale size. Cannot be less than zero." when executing script with UNION
SQL Server limiting result set
calling stored proc just won't work