Home » SQL & PL/SQL » SQL & PL/SQL » Using query to Fetch the records along with user defined column value (4 merged) (Oracle pl/sql)
Using query to Fetch the records along with user defined column value (4 merged) [message #678475] Sun, 08 December 2019 01:44 Go to next message
gsaravanan
Messages: 16
Registered: April 2015
Location: chennai
Junior Member
Hi,
I would like to get a data from user tab column table as below. Please help in this

TableName ColumnName SensitiveY/N
****. First Name Y
****. Acc No. Y
****. Sex. N

I have to use list of columns to find the column is sensitive or not.
Eg Column list... Name, AccNo, BankId, etc......

Note: my list of column contain only Name but if my table may have first name, last name, so i want to consider this as well while finding columns are sensitive or not. Its kind of using LIKE keyword in query.

Eg select table name, column name, again each row column name to use sensitive or not.
Using query to Fetch the records along with user defined column value [message #678476 is a reply to message #678475] Sun, 08 December 2019 01:46 Go to previous messageGo to next message
gsaravanan
Messages: 16
Registered: April 2015
Location: chennai
Junior Member
Hi,
I would like to get a data from user tab column table as below. Please help in this

TableName ColumnName SensitiveY/N
****. First Name Y
****. Acc No. Y
****. Sex. N

I have to use list of columns to find the column is sensitive or not.
Eg Column list... Name, AccNo, BankId, etc......

Note: my list of column contain only Name but if my table may have first name, last name, so i want to consider this as well while finding columns are sensitive or not. Its kind of using LIKE keyword in query.

Eg select table name, column name, again each row column name to use sensitive or not.
Using query to Fetch the records along with user defined column value [message #678477 is a reply to message #678475] Sun, 08 December 2019 02:15 Go to previous messageGo to next message
gsaravanan
Messages: 16
Registered: April 2015
Location: chennai
Junior Member
Hi,
I would like to get a data from user tab column table as below. Please help in this

TableName ColumnName SensitiveY/N
****. First Name Y
****. Acc No. Y
****. Sex. N

I have to use list of columns to find the column is sensitive or not.
Eg Column list... Name, AccNo, BankId, etc......

Note: my list of column contain only Name but if my table may have first name, last name, so i want to consider this as well while finding columns are sensitive or not. Its kind of using LIKE keyword in query.

Eg select table name, column name, again each row column name to use sensitive or not.
Using query to Fetch the records along with user defined column value [message #678478 is a reply to message #678475] Sun, 08 December 2019 02:16 Go to previous messageGo to next message
gsaravanan
Messages: 16
Registered: April 2015
Location: chennai
Junior Member
Hi,
I would like to get a data from user tab column table as below. Please help in this

TableName ColumnName SensitiveY/N
****. First Name Y
****. Acc No. Y
****. Sex. N

I have to use list of columns to find the column is sensitive or not.
Eg Column list... Name, AccNo, BankId, etc......

Note: my list of column contain only Name but if my table may have first name, last name, so i want to consider this as well while finding columns are sensitive or not. Its kind of using LIKE keyword in query.

Eg select table name, column name, again each row column name to use sensitive or not.
Re: Using query to Fetch the records along with user defined column value (4 merged) [message #678479 is a reply to message #678475] Sun, 08 December 2019 02:57 Go to previous messageGo to next message
Michel Cadot
Messages: 67363
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

As told you in your previous topics:

BlackSwan wrote on Mon, 20 April 2015 19:50
Welcome to this forum.
Please read and follow the forum guidelines, to enable us to help you:
http://www.orafaq.com/forum/t/88153/0/ and read http://www.orafaq.com/forum/t/174502/

Lalit Kumar B wrote on Tue, 28 April 2015 17:01
...
In none of your posts so far you have followed the forum guidelines. You didn't use code tags. Please read and follow the OraFAQ Forum Guide and How to use [code] tags, to enable us to help you...

So I repeat:
Please read the OraFAQ Forum Guide and How to use [code] tags and make your code easier to read.
Also always post your Oracle version, with 4 decimals, as solution depends on it.

With any SQL or PL/SQL question, please, Post a working Test case: create table (including all constraints) and insert statements along with the result you want with these data then we will be able work with your table and data. Explain with words and sentences the rules that lead to this result.

In the end, you did neither feedback nor answer to our questions in your previous topics, this won't lead us to be in good mood to help your now.

[Updated on: Sun, 08 December 2019 07:44]

Report message to a moderator

Re: Using query to Fetch the records along with user defined column value (4 merged) [message #678530 is a reply to message #678479] Wed, 11 December 2019 07:19 Go to previous message
Bill B
Messages: 1969
Registered: December 2004
Senior Member
SELECT (Owner || '.') || A.Table_name                            Tablename,
       A.Column_name                                             Columnname,
       CASE WHEN (b.Schema_name IS NULL) THEN 'N' ELSE 'Y' END     Sensitive
  FROM Sys.Dba_tab_columns  A
       LEFT OUTER JOIN Sys.Dba_tsdp_policy_protection_tbl B
           ON     (A.Column_name = B.Column_name)
              AND (A.Table_name = B.Table_name)
              AND (A.Owner = B.Schema_name)
              AND A.Owner = 'my_schema';

[Updated on: Wed, 11 December 2019 07:20]

Report message to a moderator

Previous Topic: Materialized Views Cannot set with refresh Fast "Error"
Next Topic: Output Dummy Record When No Record Exists
Goto Forum:
  


Current Time: Fri Sep 18 09:53:36 CDT 2020