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

Home -> Community -> Usenet -> c.d.o.tools -> How to get proper SQL query?

How to get proper SQL query?

From: Gennady <gennadyb_at_halcosoftware.com>
Date: 2000/06/19
Message-ID: <394e5ffd$0$2939@fountain.mindlink.net>#1/1

Hello,
I'd like to create a query on table which has 20 fields (F1,F2,...F20) to run it in SQL Work Sheet, but
I need to exclude five fields from the query and I can't use rest of fields explicitly.
So instead of using this:
SELECT F2,F3,F4,F5,F6,F7,F8,F9,F10,F11,F12,F13,F14,F15,F16 FROM MYTABLE;
 I try to do that like :
SELECT (SELECT COLUMN_NAME||',' FROM USER_TAB_COLUMNS WHERE TABLE_NAME='MYTABLE' AND COLUMN_NAME NOT IN ('F1','F17','F18','F19','F20')),NULL
FROM MYTABLE;
But it doesn't work.
How could I fix last expression to get proper result? Thanks,
Gennady Received on Mon Jun 19 2000 - 00:00:00 CDT

Original text of this message

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