Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

case when between teradata and oracle

Posted on 2010-11-18
4
Medium Priority
?
1,140 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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

This post looks at MongoDB and MySQL, and covers high-level MongoDB strengths, weaknesses, features, and uses from the perspective of an SQL user.
In this blog post, we’ll look at how ClickHouse performs in a general analytical workload using the star schema benchmark test.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
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.

598 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