Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: where clause with subquery not returning.
What is the type of the column table_uploadfile?
If it is CHAR(n), the result is trivial because
column is padding with blanks.
See:
v734> create table t (table_name varchar2(30)); v734> insert into t values ('T'); v734> select * from t;
TABLE_NAME
1 row selected.
v734> select table_name, column_name from all_tab_columns 2 where table_name = ( select table_name from t);
TABLE_NAME COLUMN_NAME ------------------------------ ------------------------------ T TABLE_NAME
1 row selected.
v734> drop table t; v734> create table t (table_name char(30)); v734> insert into t values ('T'); v734> select * from t;
TABLE_NAME
1 row selected.
v734> select table_name, column_name from all_tab_columns 2 where table_name = ( select table_name from t );
no rows selected
screwbai_at_my-deja.com a écrit dans le message <7sq5ni$to7$1_at_nnrp1.deja.com>...
>1) shows me the table_name from ALL_TAB_COLUMNS
>2) shows me the table_uploadfile from qupload.
> both return the same table_name.
>
>3) 1+2: I use 2 as a subquery to 1 then NO DICE.
>
>This should be simple andy ideas of what I am doing wrong?
>Also the subquery only returns one line (the qupload table only has one
>row in it).
>
>
>1)
>select distinct table_name from ALL_TAB_COLUMNS where
>table_name='QPRICE';
>TABLE_NAME
>------------------------------
>QPRICE
>1 row selected.
>
>2)
>select distinct table_uploadfile from qupload;
>TABLE_UPLOADFILE
>------------------------------
>QPRICE
>
>3)
>select * from ALL_TAB_COLUMNS where table_name = (
>select distinct table_uploadfile from qupload);
>OWNER TABLE_NAME
>------------------------------ ------------------------------
>0 rows selected.
>
>
>Sent via Deja.com http://www.deja.com/
>Before you buy.
Received on Tue Sep 28 1999 - 07:25:09 CDT
![]() |
![]() |