RE: How to select only columns having values..

From: Raja Kannan Sengoden <rajakannan_at_aetins.com>
Date: Mon, 17 Feb 2014 15:36:22 +0800
Message-ID: <17E9C8F47A3C9149BAF699ED90E9DF65AC102403A2_at_penta-mail1.pentasoft.my>



Thank a lot Hemant K Chitale.

As per the real scenario, all the columns will have the value.

But for the particular condition, only limited columns will have value.

At this time, I don't want to do analyze the data and maintain.

Hence I requested, is there any simple way..

Attached query helped me to get the expected result.

Thanks to Tony who helped me to get the expected result.

Thanks & Regards,
Raja

From: Chitale, Hemant K [mailto:Hemant-K.Chitale_at_sc.com] Sent: Monday, February 17, 2014 3:12 PM
To: Raja Kannan Sengoden
Cc: oracle-l_at_freelists.org
Subject: RE: How to select only columns having values..

> 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_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Raja Kannan Sengoden Sent: Monday, February 17, 2014 12:38 PM To: oracle-l_at_freelists.org
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.



--
http://www.freelists.org/webpage/oracle-l


Received on Mon Feb 17 2014 - 08:36:22 CET

Original text of this message