We're a community of 1.1M IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,080,642 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

decode using operators?

Is there a workaround to this as decode does not seem to allow the use of greater than equal sign
I am trying to show the comment for any days beyond 4 days, not just 4 days.

decode(shipdate-orderdate,'4','This is unsatisfactory!') comments
from orders

Thanks in advance!
:)

3
Contributors
2
Replies
5 Days
Discussion Span
1 Year Ago
Last Updated
3
Views
amishraa
Junior Poster in Training
68 posts since Oct 2009
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

Consider...

Select Order_Number
From Orders
Where ShipDate - OrderDate >= 4;
hfx642
Posting Pro
515 posts since Nov 2009
Reputation Points: 248
Solved Threads: 105
Skill Endorsements: 1

You can try this code

select (case when shipdate-orderdated>=4 then 'Unsatisfactory!' else 'Satisfactory!' end)
from orders

babyDBA
Newbie Poster
10 posts since Sep 2009
Reputation Points: 10
Solved Threads: 5
Skill Endorsements: 0

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page generated in 0.0560 seconds using 2.65MB