This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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 Murach's Java Servlets and JSP this week in the Servlets 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: 19649
    
  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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Help me to translate this query oracle to sql server
 
Similar Threads
sqlException : "Invalid scale size. Cannot be less than zero." when executing script with UNION
Problem with Hibernate Query
calling stored proc just won't work
SQL Server limiting result set
Code to trigger nightly batch job works .. but I don't know why it works