Home » SQL & PL/SQL » SQL & PL/SQL » please check the query?
please check the query? [message #317051] Tue, 29 April 2008 05:53 Go to next message
tondapi
Messages: 99
Registered: August 2007
Location: usa
Member
Hi,

I am not able to get this below query answer correctly.I showing error(inconsistent datatype).


select CODE,
case when Q_ID=528 then 'NANDA' else BRQ_ID end
from nrQ


please tell the answer
Re: please check the query? [message #317052 is a reply to message #317051] Tue, 29 April 2008 05:55 Go to previous messageGo to next message
skooman
Messages: 912
Registered: March 2005
Location: Netherlands
Senior Member
What is the datatype of BRQ_ID? Number perhaps? If so, you would have to put a to_char around it.
Re: please check the query? [message #317054 is a reply to message #317052] Tue, 29 April 2008 06:06 Go to previous messageGo to next message
tondapi
Messages: 99
Registered: August 2007
Location: usa
Member
nUMBER_TYPE
Re: please check the query? [message #317057 is a reply to message #317054] Tue, 29 April 2008 06:31 Go to previous message
Michel Cadot
Messages: 64140
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
So there is a type mismatch with 'NANDA' the other value returned by your CASE.

Regards
Michel
Previous Topic: Insert values from Legacy system to Oracle
Next Topic: HOW TO CHANGE SQL QUERY TO GET SPECIFIC RESULT
Goto Forum:
  


Current Time: Fri Dec 09 04:24:55 CST 2016

Total time taken to generate the page: 0.16199 seconds