RE: How to select only columns having values..

  • From: "Chitale, Hemant K" <Hemant-K.Chitale@xxxxxx>
  • To: <rajakannan@xxxxxxxxxx>
  • Date: Mon, 17 Feb 2014 15:11:40 +0800

> If I don't know exactly, Is there any way to select only those 10
columns?

Without actually querying the table, you cannot identify the 10 columns.

 

You could periodically query the table for all the rows and identify
columns with NOT NULL values and then maintain a list of such columns as
"meta data".  However, there is no guarantee that a column that had NULL
values for all 1000 rows yesterday or even a minute ago still has NULL
values because there might have been an INSERT or UPDATE that set one
row's value to a non-NULL.

 

How do you know that the 190 columns have NULL values ?  

 

Hemant K Chitale

 

 

From: oracle-l-bounce@xxxxxxxxxxxxx
[mailto:oracle-l-bounce@xxxxxxxxxxxxx] On Behalf Of Raja Kannan Sengoden
Sent: Monday, February 17, 2014 12:38 PM
To: oracle-l@xxxxxxxxxxxxx
Subject: How to select only columns having values..

 

Dear Experts,

 

I have a table with 200 columns and having above 1000 Records. 

 

But for a particular where clause, there is only 3 records fetched.

 

As the table having 200 columns, but the particular 3 record having only
10 columns with some value, and 190 columns having null value.

 

If I am sure, which columns I want or which column having value, then I
can select only those columns.

 

If I don't know exactly, Is there any way to select only those 10
columns?

 

If I get the data like this, It will save few minutes for the data
arrangement.

 

 

Thanks in advance.

 

Raja.


This email and any attachments are confidential and may also be privileged. If 
you are not the intended recipient, please delete all copies and notify the 
sender immediately. You may wish to refer to the incorporation details of 
Standard Chartered PLC, Standard Chartered Bank and their subsidiaries at 
https://www.sc.com/en/incorporation-details.html.

Other related posts: