Home » SQL & PL/SQL » SQL & PL/SQL » SQL*Plus returns wrong and different results for same query
SQL*Plus returns wrong and different results for same query [message #21451] Mon, 05 August 2002 01:46 Go to next message
windy
Messages: 3
Registered: August 2002
Junior Member
In Sql*Plus:

> select RECEIVER_ID from ADDRESS_BOOK where ACCOUNT_ID = '11427';

RECEIVER_ID
-----------
11427
11447
11427
11447
11427

-- Then

select RECEIVER_ID from ADDRESS_BOOK where ACCOUNT_ID = '11427' and RECEIVER_ID = '11427';

no rows selected !!!!!!!

-----
The Oracle version is 8.1.7.0.0.
What's wrong here? Any hints?

Thanks a lot
Windy
Re: SQL*Plus returns wrong and different results for same query [message #21454 is a reply to message #21451] Mon, 05 August 2002 04:52 Go to previous message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
check the datatype of RECEIVER_ID, whether it is of CHAR.
becuase with char, data values '11427' and '11427 ' are different

Previous Topic: Re: how to execute a string in PL/SQL
Next Topic: calendar simulation
Goto Forum:
  


Current Time: Fri Apr 19 23:09:03 CDT 2024