?
Solved

case when between teradata and oracle

Posted on 2010-11-18
4
Medium Priority
?
1,128 Views
Last Modified: 2013-11-11
I have this sql in teradata sql
how can I implement the same logic of more when condition and when condition in oracle

Case
         When  (Character_Length(Trim(Cl_Pro.Prog)) = 5
   And    SUBSTRING(Cl_Pro.Prog
   FROM  1 FOR 1) = '7'
   And   Cl_Pro.SUgt In('01', '08', '27'))
0
Comment
Question by:it-rex
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 32

Accepted Solution

by:
awking00 earned 2000 total points
ID: 34168239
Case
         When  (Length(Trim(Cl_Pro.Prog)) = 5
   And    SUBSTRING(Cl_Pro.Prog,1,1) = '7'
   And   Cl_Pro.SUgt In('01', '08', '27'))
then <some value or expression>
end
0
 
LVL 32

Expert Comment

by:awking00
ID: 34168248
Sorry, Oracle syntax is SUBSTR not SUBSTRING
0
 
LVL 11

Author Closing Comment

by:it-rex
ID: 34173241
thanks
0
 
LVL 32

Expert Comment

by:awking00
ID: 34173416
Glad to help :-)
0

Featured Post

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
Lotus Notes has been used since a very long time as an e-mail client and is very popular because of it's unmatched security. In this article we are going to learn about  RRV Bucket corruption and understand various methods to Fix "RRV Bucket Corrupt…
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question