Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Oracle statement to SQL Server

$
0
0

Hi All,

I have a oracle statement, I need same logic in SQL Server. I know in SQL server we use CASE statement instead of decode, but I don't understand this oracle statement

 Select count(decode(sign((A.StartDate - A.EndDate) - 60) ,-1, 'NewDateField',0, 'NewDateField')) NewDateField_1

From SampleTable A

 I need SQL code for this in SQL server.

Thanks in advance,
RH


sql


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>