Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: strange behaviour in select statement

RE: strange behaviour in select statement

From: Powell, Mark D <mark.powell_at_eds.com>
Date: Fri, 28 Oct 2005 08:57:46 -0400
Message-ID: <5A14AF34CFF8AD44A44891F7C9FF41050395BB7D@usahm236.amer.corp.eds.com>


Raja, you did not show the list the count(*)  

Try
clear columns
set feedback on
set echo on
select * from product_component_version; select * from image_staging_table;
select hospital_id from image_staging_table; select acct# from image_staging_table;
select hospital_id, acct# from image_staging_table. select dump(hospital_id) as Hospital_id, dump(acct#) as acct# from image_staging_table;  

This should show what is going on.  


From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of raja rao Sent: Friday, October 28, 2005 8:34 AM
To: stephen booth
Cc: oracle list
Subject: Re: strange behaviour in select statement

Hi,  

Thanks for your reply.  

If the below is true:  

HOSPITAL_ID ACCT#

----------------- -------------

ASHFORD [NULL]
[NULL] X104978978   the select count(*) should result 2 rows. However, my select count(*) is giving one only.  

and when i select a specific col, it is giving value and the feeback is 1 row.  

stephen booth <stephenbooth.uk_at_gmail.com> wrote:

	On 28/10/05, raja rao wrote:

>
> when i select more than 1 column, some colums data is missing.
Am i missing
> something to setup.
>
The first thing that leaps to mind to try to identify the problem is to use NVL() on both columns in your select to display something (the string 'this is NULL' for example) if the value is null, or maybe do a select count(*) from image_staging_table; to check there's only one row. It's possible that your table might have two rows looking like: HOSPITAL_ID ACCT# ----------------- ------------- ASHFORD [NULL] [NULL] X104978978 rather than one row such as: HOSPITAL_ID ACCT# ----------------- ------------- ASHFORD X104978978 which is what you are presumably expecting. Stephen -- It's better to ask a silly question th an to make a silly
assumption.         

Yahoo! FareChase - Search multiple travel sites in one click. <http://us.lrd.yahoo.com/_ylc=X3oDMTFqODRtdXQ4BF9TAzMyOTc1MDIEX3MDOTY2OD gxNjkEcG9zAzEEc2VjA21haWwtZm9vdGVyBHNsawNmYw--/SIG=110oav78o/**http%3a// farechase.yahoo.com/>

--
http://www.freelists.org/webpage/oracle-l
Received on Fri Oct 28 2005 - 08:00:25 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US