Home » SQL & PL/SQL » SQL & PL/SQL » Error in case function?
Error in case function? [message #343150] Tue, 26 August 2008 08:26 Go to next message
tondapi
Messages: 99
Registered: August 2007
Location: usa
Member

Hi,

I am using below case function ,it showing error.Can any one help me what is worng.

case
when (@Select(Invoice Details\Invoice Entity) ='364' OR '503' OR '504' ) AND (@Select(Application\Application Sequence) <> '35') then '6'
when (@Select(Invoice Details\Invoice Entity) ='065') AND (@Select(DESA Details\Manufacturing Plant)='065') AND (@Select(Application\Application Sequence)=35) then '5'
when (@Select(Bill to details\Bill To Cust Id)='56330') then '1'
when (@Select(Bill to details\Bill To Cust Id)='05037') then '3'
when (@Select(DESA Details\Inter Comp Indicator) = 'N') and (@Select(Bill to details\Bill To Cust Id)='05570') and (@Select(Bill to Channel details\Bill To Low Channel Cd)='121' or '122') then '3'
when (@Select(DESA Details\Inter Comp Indicator) = 'Y') and (@Select(Bill to details\Bill To Cust Id)='05311') and (@Select(DESA Details\Manufacturing Plant)='087') then '8'
when (@Select(DESA Details\Inter Comp Indicator) = 'Y') and (@Select(Bill to details\Bill To Cust Id)='04222' OR '07264') and (@Select(Invoice Details\Invoice Entity) <> '364' OR '503' OR '504') then '2'
when (@Select(Bill to details\Bill To Cust Id)='05891') then '2'
when (@Select(DESA Details\Inter Comp Indicator) = 'Y') and (@Select(Bill to Channel details\Bill To Low Channel Cd)='120') and (@Select(Invoice Details\Invoice Entity) <> '364' OR '503'OR'504') then '2'
when (@Select(DESA Details\Inter Comp Indicator) = 'Y') and (@Select(Bill to details\Bill To Cust Id)='04222' OR '07264') and (@Select(Invoice Details\Invoice Entity) = '364' OR '503'OR'504') then '7'
when (@Select(DESA Details\Inter Comp Indicator) = 'Y') and (@Select(Bill to Channel details\Bill To Low Channel Cd)='120') and (@Select(Invoice Details\Invoice Entity) = '364' OR '503'OR'504') then '7'
when (@Select(DESA Details\Inter Comp Indicator) = 'N') then '1'
else '9'
end
Re: Error in case function? [message #343152 is a reply to message #343150] Tue, 26 August 2008 08:30 Go to previous messageGo to next message
BlackSwan
Messages: 25050
Registered: January 2009
Location: SoCal
Senior Member
http://www.orafaq.com/forum/t/88153/0/
Please read & FOLLOW the Posting Guidelines as stated in URL above

Error? What error? I don't see any error posted here.
Re: Error in case function? [message #343153 is a reply to message #343150] Tue, 26 August 2008 08:30 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
1) I don't see any error message.
2) This ia an Oracle forum, and that's SQL Server unless I'm very much mistaken.
Re: Error in case function? [message #343154 is a reply to message #343153] Tue, 26 August 2008 08:32 Go to previous messageGo to next message
tondapi
Messages: 99
Registered: August 2007
Location: usa
Member
It is showing invalid operater error and it is oracle not sql server!
Re: Error in case function? [message #343155 is a reply to message #343154] Tue, 26 August 2008 08:33 Go to previous messageGo to next message
BlackSwan
Messages: 25050
Registered: January 2009
Location: SoCal
Senior Member
tondapi wrote on Tue, 26 August 2008 06:32
It is showing invalid operater error and it is oracle not sql server!


To you perhaps, but not to us.
Re: Error in case function? [message #343156 is a reply to message #343153] Tue, 26 August 2008 08:37 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
The construct
@Select(Invoice Details\Invoice Entity) ='065'
is nothing to do with Oracle, I'm afraid.

Possibly if you could give us some backgroun to this problem, then things might becode clearer.

Are you, for instance, trying to convert some code to run against an oracle database?
Re: Error in case function? [message #343162 is a reply to message #343156] Tue, 26 August 2008 08:52 Go to previous messageGo to next message
Olivia
Messages: 519
Registered: June 2008
Senior Member
tondapi wrote on Tue, 26 August 2008 06:32
Quote:


It is showing invalid operater error and it is oracle not sql server!



Would be happy if please execute the below query and paste here the result what you get? Smile

 select banner from v$version;




Regards,
Oli

[Updated on: Tue, 26 August 2008 08:52]

Report message to a moderator

Re: Error in case function? [message #343228 is a reply to message #343154] Tue, 26 August 2008 12:42 Go to previous messageGo to next message
joy_division
Messages: 4644
Registered: February 2005
Location: East Coast USA
Senior Member
You are just showing no forward progress in understanding a problem, learning or following instructions I am sorry to say.
Re: Error in case function? [message #343242 is a reply to message #343154] Tue, 26 August 2008 13:47 Go to previous messageGo to next message
prtz
Messages: 11
Registered: January 2008
Junior Member
Quote:

It is showing invalid operater error and it is oracle not sql server!



Your database could be Oracle, agreed. But that doesn't make your query Oracle compliant.

You are attempting to run a SQL Server query in Oracle.

You can always try that, just as you can try to kill a housefly with a bazooka. Wink

prtz

Re: Error in case function? [message #343274 is a reply to message #343242] Tue, 26 August 2008 17:01 Go to previous messageGo to next message
William Robertson
Messages: 1640
Registered: August 2003
Location: London, UK
Senior Member
prtz wrote on Tue, 26 August 2008 19:47
You can always try that, just as you can try to kill a housefly with a bazooka. Wink

At least a bazooka will kill a housefly. This is more like refuelling your BMW with cheese.

[Updated on: Tue, 26 August 2008 17:01]

Report message to a moderator

Re: Error in case function? [message #343283 is a reply to message #343150] Tue, 26 August 2008 18:18 Go to previous message
Kevin Meade
Messages: 2101
Registered: December 1999
Location: Connecticut USA
Senior Member
Quote:
This is more like refuelling your BMW with cheese.



hehehe, I bet after you fill up, it runs like my KIA.

Kevin
Previous Topic: Format Excel using pl/sql
Next Topic: Database Trigger
Goto Forum:
  


Current Time: Sat Dec 10 11:12:56 CST 2016

Total time taken to generate the page: 0.18413 seconds