Re: Where clause apparently failing
Date: Sat, 20 Sep 2008 23:21:59 -0700
Message-Id: <1221978119.10017.1275097827@webmail.messagingengine.com>
Hmm..
SQL*Plus: Release 10.2.0.1.0 - Production on Fri Sep 19 20:21:20 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Enter password:
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning and Data Mining options
SQL> create table ucdv_cc_summ (patient_id number(05)
2 ,study_number VARCHAR2(100) 3 )
4 /
Table created.
SQL> begin
2 insert into ucdv_cc_summ VALUES ( 1 , 'UCDCC#128'); 3 insert into ucdv_cc_summ VALUES ( 2 , 'UCDCC#157'); 4 insert into ucdv_cc_summ VALUES ( 2 , 'UCDCC#165'); 5 insert into ucdv_cc_summ VALUES ( 2 , 'UCDCC#171');6 end;
7 /
PL/SQL procedure successfully completed.
SQL> column study_number FORMAT A15 wrap; SQL> SELECT patient_id , study_number FROM ucdv_cc_summ 2 /
PATIENT_ID STUDY_NUMBER
---------- ---------------
1 UCDCC#128 2 UCDCC#157 2 UCDCC#165 2 UCDCC#171
SQL> CREATE VIEW ucdv_cc_summaryae AS
2 SELECT patient_id , study_number FROM ucdv_cc_summ
3 /
View created.
SQL> SELECT patient_id , study_number FROM ucdv_cc_summaryae 2 /
PATIENT_ID STUDY_NUMBER
---------- ---------------
1 UCDCC#128 2 UCDCC#157 2 UCDCC#165 2 UCDCC#171
SQL> select patient_id, study_number
2 from ucdv_cc_summaryae
3 where study_number = 'UCDCC#128'
4 /
PATIENT_ID STUDY_NUMBER
---------- ---------------
1 UCDCC#128
SQL>
HTH
GovindanK
-- http://www.freelists.org/webpage/oracle-lReceived on Sun Sep 21 2008 - 01:21:59 CDT