Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Database > Oracle
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Oracle General Oracle database discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Oracle section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 9th, 2004, 10:39 AM
Registered User
 
Join Date: Nov 2004
Location: Bogtoa, Cundinamarca, Colombia.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to marcomfigueroa Send a message via Yahoo to marcomfigueroa
Default Query with case

hello, i have this query, it works in Oracle 9 and 8 but not works in oracle 7, appears an Oracle: ORA-00907: missing right parenthesis error in the line where the CASE begins....

some help???

select o.identificacion,
count (*) envios,
count (c.rtado_presentacion) colocaciones,

(case
      when (count (c.rtado_presentacion))>= 1
      then min (c.cno_oferta)
end) cnoCol1,

(case
      when (count (c.rtado_presentacion))>= 1
      then substr (min (c.cno_oferta),1,1)
end) area1col1,

(case
      when (count (c.rtado_presentacion))>= 1
      then substr (min (c.cno_oferta),2,1)
end) nivel1col1,

(case
      when (count (c.rtado_presentacion))>= 2
      then max (c.cno_oferta)
end) cnocol2,

(case
      when (count (c.rtado_presentacion))>= 2
      then substr (max (c.cno_oferta),1,1)
end) areacol2,

(case
      when (count (c.rtado_presentacion))>= 2
      then substr (max (c.cno_oferta),2,1)
end) nivelcol2

from cruce c, ofertas o
where o.fecha_inscripcion >= '01/01/2004'
and o.fecha_inscripcion <= '09/30/2004'
and c.identificacion_oferta = +o.identificacion
group by o.identificacion
order by colocaciones


  #2 (permalink)  
Old November 9th, 2004, 11:17 AM
aas aas is offline
Authorized User
 
Join Date: Mar 2004
Location: Moscow, , Russia.
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to aas
Default

The operator "CASE ... " is not supporting in Oracle 7x.

  #3 (permalink)  
Old November 9th, 2004, 11:29 AM
Registered User
 
Join Date: Nov 2004
Location: Bogtoa, Cundinamarca, Colombia.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to marcomfigueroa Send a message via Yahoo to marcomfigueroa
Default

ok.... ¿ another operator does not exist who can replace the operator CASE in Oracle 7.x ??
  #4 (permalink)  
Old November 9th, 2004, 11:32 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , USA.
Posts: 1,111
Thanks: 0
Thanked 3 Times in 3 Posts
Default

I think you can use DECODE for 7.x. I'm not 100% sure.

  #5 (permalink)  
Old November 9th, 2004, 12:00 PM
aas aas is offline
Authorized User
 
Join Date: Mar 2004
Location: Moscow, , Russia.
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to aas
Default

You can use the DECODE operator in Oracle 7x.


  #6 (permalink)  
Old August 23rd, 2012, 12:12 PM
Registered User
Points: 3, Level: 1
Points: 3, Level: 1 Points: 3, Level: 1 Points: 3, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Select -Statement using 2 tables

i have 2 tables apple a and banana b

if a.pineapple= "p" then display "a.first_name" and 'a.last_name"
if a.pineapple = "O" then display "b.code"

can any one hlp me to write the selct statements
  #7 (permalink)  
Old January 22nd, 2013, 02:51 AM
Registered User
Points: 3, Level: 1
Points: 3, Level: 1 Points: 3, Level: 1 Points: 3, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2013
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Cool How Can Learn?

How can learn Oracle, DBA, SQL and total management. Please help
  #8 (permalink)  
Old January 22nd, 2013, 03:01 AM
Registered User
Points: 33, Level: 1
Points: 33, Level: 1 Points: 33, Level: 1 Points: 33, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2012
Location: Nanjing
Posts: 6
Thanks: 0
Thanked 1 Time in 1 Post
Default

use DECODE for 7.x.
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
multiple column update query with Case vinod_yadav1919 SQL Language 4 July 3rd, 2008 06:53 PM
Case help michael.boucher SQL Server 2005 0 May 23rd, 2008 01:45 AM
case clause in query mateenmohd SQL Server 2000 2 February 22nd, 2005 05:49 AM
search string either Upper case or lower case rylemer Beginning VB 6 3 March 24th, 2004 04:23 PM
Check Case in a Case-Insensitive DB nbryson SQL Language 1 January 23rd, 2004 07:36 AM



All times are GMT -4. The time now is 08:53 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.