How to create hidden column in Oracle Table
Hi folks
i have one doubt regarding hidden column creation in Oracle Table..
Let me briefly explain my requirements.
I have one table called UWRMC_MAST is table contain the following columns
RMC_N_ID NUMBER(10) NOT NULL,
COB_N_ID NUMBER(2) NOT NULL,
SUBCOB_N_ID NUMBER(2),
RMC_C_CODE VARCHAR2(10 BYTE) NOT NULL,
RMC_C_NAME VARCHAR2(100 BYTE) NOT NULL,
CREATED_N_BY NUMBER(10) NOT NULL,
CREATED_D_DT DATE NOT NULL,
MODIFIED_N_BY NUMBER(10) NOT NULL,
MODIFIED_D_DT DATE NOT NULL,
RECORD_N_STS NUMBER(1) NOT NULL,
RMC_C_REMARKS VARCHAR2(256 BYTE),
EFFECT_D_DT DATE NOT NULL
RMC_N_ID is primary key
i want to create one column like Old_EFFECT_D_DT as virtual column
when ever i update the effective date that date should be insert into Old_EFFECT_D_DT i.e., Virtual Column
For example
SQL> select RMC_N_ID, COB_N_ID, SUBCOB_N_ID, RMC_C_CODE, EFFECT_D_DT from uwrmc_mast;
RMC_N_ID COB_N_ID SUBCOB_N_ID RMC_C_CODE EFFECT_D_
46 1 74 PCTMOTR 02-FEB-11
Below i update the effective date(01-feb-2011
SQL> update uwrmc_mast
2 set EFFECT_D_DT = '01-apr-2011'
3 where rmc_n_id =46;
1 row updated.
But i want a result like below
SQL> select RMC_N_ID, COB_N_ID, SUBCOB_N_ID, RMC_C_CODE, EFFECT_D_DT from uwrmc_mast;
RMC_N_ID COB_N_ID SUBCOB_N_ID RMC_C_CODE EFFECT_D_ OLD_EFFE
46 1 74 PCTMOTR 01-APR-11 02-FEB-11Is this possible to do in oracle , kindly give a solution for my requirement
Regards
Arun
Arun wrote:
Hi Mr.David_Aldridge
Am having the doubt that's why i posted my quires in oracle forums.. just i want to know whether my requirement suit for VIRTUAL COLUMN in Table.
Regards,
ArunWell, I'm not sure exactly what your requirement is.
If you want to audit changes to the records of that table then it would be better to use Oracle's auditing facility. If this previous change date is really a required part of your actual application functionality then you might use the application itself to maintain the previous date as a column in the table, as you say, or if you need to maintain the history of changes then add a new table so you can keep track of multiple changes.
Similar Messages
-
How to create dynamics columns in oracle query1.
hi,
how to create dynamics columns in oracle query.its very urgent.
regards
prasad..Urgent is it?
Why? Have you forgotten to do your coursework and you'll get thrown off your course if you don't hand it in today?
What makes you believe that your request for help is more important than someone else who has requested help? It's very rude to assume you are more important than somebody else, and I'm sure they would like an answer to their issue as soon as they can get one too, but they've generally been polite and not demanded that it is urgent.
Also, you assume that people giving answers are all sitting here just waiting to answer your question for you. That's not so. We're all volunteers with our own jobs to do. How dare you presume to demand our attention with urgency.
If you want help and you want it answering quickly you simply just put your issue forward and provide as much valuable information as possible.
Looking at your post you haven't told us what database version you are using, you haven't provided any create table DDL's and insert statements to populate that with sample data, and you haven't even shown us that you've had a go at doing something yourself.
You will find if you post on here demanding your post is urgent then most people will just ignore it, some will tell you to get lost, and some will explain to you why you shouldn't post "urgent" requests. Occasionally you may find somebody who's got nothing better to do who will actually provide you with an answer, but you really are limiting your options by not asking properly.
/rant
As a basic example of dyanamic SQL:
DECLARE
cur PLS_INTEGER := DBMS_SQL.OPEN_CURSOR;
cols DBMS_SQL.DESC_TAB;
ncols PLS_INTEGER;
BEGIN
-- Parse the query.
DBMS_SQL.PARSE(cur, 'SELECT hiredate, sal FROM emp', DBMS_SQL.NATIVE);
-- Retrieve column information
DBMS_SQL.DESCRIBE_COLUMNS (cur, ncols, cols);
-- Display each of the column names
FOR colind IN 1 .. ncols
LOOP
DBMS_OUTPUT.PUT_LINE (cols.col_name);
END LOOP;
DBMS_SQL.CLOSE_CURSOR (cur);
END;
/ -
How to create some columns dynamically in the report designer depending upon the input selection
Post Author: ekta
CA Forum: Crystal Reports
how to create some columns dynamically in the report designer depending upon the input selection
how export this dynamic report in (pdf , xls,doc and rtf format)
report format is as below:
Element Codes
1
16
14
11
19
10
2
3
Employee nos.
Employee Name
Normal
RDO
WC
Breveavement
LWOP
Sick
Carers leave
AL
O/T 1.5
O/T 2.0
Total Hours
000004
PHAN , Hanh Huynh
68.40
7.60
76.00
000010
I , Jungue
68.40
7.60
2.00
5.00
76.00
000022
GARFINKEL , Hersch
66.30
7.60
2.10
76.00
In the above report first column and the last columns are fixed and the other columns are dynamic depending upon the input selection:
if input selection is Normal and RDO then only 2 columns w'd be created and the other 2 fixed columns.
Can anybody help me how do I design such report....
ThanksHi Developer life,
According to your description that you want to dynamically increase and decrease the numbers of the columns in the table, right?
As Jason A Long mentioned that we can use the matrix to do this and put the year field in the column group, amount fields(Numric values) in the details, add an filter to filter the data base on this column group, but if
the data in the DB not suitable to add to the matrix directly, you can use the unpivot function to turn the column name of year to a single row and then you can add it in the column group.
If there are too many columns in the column group, it will fit the page size automatically and display the extra columns in the next page.
Similar threads with details steps for your reference:
https://social.technet.microsoft.com/Forums/en-US/339965a1-8cca-41d8-83ef-c2548050799a/ssrs-dataset-column-metadata-dynamic-update?forum=sqlreportings
If your still have any problem, please try to provide us more details information, such as the data structure in the DB and the table structure you are currently designing.
Any question, please feel free to let me know.
Best Regards
Vicky Liu -
How can I select columns from a table EMP, using Select statement?.
Hi Friends,
How can I select columns from a table EMP?.
I want to select columns of EMP table, using select statement.
Please reply me urgently.
ShahzadSomething like this:
scott@DBA> select empno,ename,job from emp;
EMPNO ENAME JOB
7369 SMITH CLERK
7499 ALLEN SALESMAN
7521 WARD SALESMAN
7566 JONES MANAGER
7654 MARTIN SALESMAN
7698 BLAKE MANAGER
7782 CLARK MANAGER
7788 SCOTT ANALYST
7839 KING PRESIDENT
7844 TURNER SALESMAN
7876 ADAMS CLERK
7900 JAMES CLERK
7902 FORD ANALYST
7934 MILLER CLERK
14 rows selected.Check the documentation:
http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_10002.htm#sthref9697
Message was edited by:
Delfino Nunez -
How to find encrypted columns in oracle 10g database
Hi,
How to find encrypted columns in oracle 10g database? We can see using view dba_encrypted_columns or all_encrypted_columns .
my question is apart from this is there anyother views or tables?
Thanks..user602872 wrote:
Hi,
How to find encrypted columns in oracle 10g database? We can see using view dba_encrypted_columns or all_encrypted_columns .
my question is apart from this is there anyother views or tables?Hmm not which I could find,
SQL> select * from dict where lower(table_name) like '%encrypted%';
TABLE_NAME
COMMENTS
DBA_ENCRYPTED_COLUMNS
Encryption information on columns in the database
ALL_ENCRYPTED_COLUMNS
Encryption information on all accessible columns
USER_ENCRYPTED_COLUMNS
Encryption information on columns of tables owned by the user
SQL>HTH
Aman.... -
How to create new database on Oracle 10g
Hi All,
Can any one tell me how to create new database on oracle 10g.
Thanks in Advance for your help.again some confusion here.....
u said u need a new database in your first post and now you saying u need a new schema..
one database has many schemas(users)..... ex: scott,sys,system are few of them...
now it depends you need seperate database for test,dev environment - this is in the case u have many schemas under each database and many tables(objects) under each schema.
OR
You just need a separate schema (in same db) for test,dev environment...where in you will have multiple tables in each schema...U need to know the dba credentials of the db to create a new schema.
ideally u need to have different database...You can create one with out sys/system(oracle users) password as these passwords are db dependent.
what you need is access to the any machine where server is installed(can be the same mc where you have your dev db or a diff machine) and that will be the machine where your db will be installed (can do it through database configuration assistance),ofcourse you will need windows authentication for this.
so you login to the same machine or access it from your machine using remote login.
I hope that is clear.Hope i am not listing things that you already know..Just did it coz of confusion between db and schema
Message was edited by:
coolguy -
How to sum the column in a table seperated by sign.
How to sum the column in a table separate by sign.
For Example:
A B
10 MOHAN
-15 KUMAR
-25 MARCH
50 MAYSELECT SUM(CASE SIGN(A) WHEN 1 THEN A ELSE NULL END) SUM_POSTIIVE,
SUM(CASE SIGN(A) WHEN -1 THEN A ELSE NULL END) SUM_NEGATIIVE
FROM tbl
/SY. -
How to delete a column from the table control in module pool?
Hi,
can any one please tell How to delete a column from the table control in module pool?
thanks in advance
warm regards
HareeshKumar Nhi hareesh,
I think it is better to hide it.
How to hide: You can check this link
Dynamic Hide column in table control -
How to Delete a Column in Internal Table
Hi All,
Does any one know ,How to Delete a Column in Internal Table?Hi,
For deleting the column in the internal table, you have to eliminate the field which you want to delete.
loop at itab into wa.
move corresponding wa to wa1.
append wa1 to itab1.
clear wa1.
clear wa.
endloop.
wa1 is the workarea without the field which you want to delete.
itab1 is the internal table which consists of the deleted column. -
How to create an arrow in a table
How to create an arrow in a table in numbers.
If you have plus or minus numbers, I want to know a green arrow on the increase is positively or a red arrow if it is negative numberMaybe something like this?
-
How to create a user in oracle.
how to create a user in oracle level.i know how to create from front end.can any body suggest.how to create oracle user from backend.
Thanks,
DaveHi,
We can use the 'hr_user_acct_internal.create_fnd_user' API to create the users. The sample code is as follows:
BEGIN
apps.hr_user_acct_internal.create_fnd_user
(p_user_name => 'XXX',
p_password => 'XXX',
p_employee_id => 1234(This is the person id from per_all_people_f),
p_user_id => x_user_id,
p_user_start_date => SYSDATE,
p_email_address => 'XXX',
p_description => 'XXX',
p_password_date => NULL
COMMIT;
END;
and to add the responsibility to the user, we can use the following code.
BEGIN
fnd_user_pkg.addresp
(username => 'XXX',
resp_app => user_res_rec.application_short_name,
resp_key => user_res_rec.responsibility_key,
security_group => 'STANDARD',
description => 'DESCRIPTION',
start_date => SYSDATE,
end_date => NULL
END
Best Regards
Arun Kumar S.R
Apps Associates -
How to create a wallet in oracle RAC environment
How to create a wallet in oracle RAC environment.
While running following command "alter system set encryption key identified by "thalesdata4";
I am getting error message "cannot auto create wallet" or "failed to open wallet.
Please suggest correct way to create a wallet in RAC environment.
Thanks
Sudhirhi,
please refer for detailed explanation
Master Note for SSL Configuration in Fusion Middleware 11g [ID 1218695.1]
regards -
How to create a database in ORACLE 8i
How to create a database in ORACLE 8i
hello ...
enter in
http://www.oracle.com/pls/db102/portal.portal_db?selected=2 between demand and type in "create database"
or read others docs ORACLE.
AF -
How to create t-code for a table and how to create transaction variant???
Hi,
I have created a custom table zsark.
Now my requirement is : I have to create a transaction variant zsark_var for sm30 and table zsark. I have to disable the output of the first screen. I have to assign the transaction variant to the transaction code of table zsark.
Now,
1. how to create transaction code to a table. Can any one give me the
staps??
2. how to create transaction variant for the above requirement???
Thanks & Regards,
SarkarHi
1 Goto SE93 transaction
2 Choose 5th option Transaction with parameters
3 Give transaction : SM30, Check Skip Initial Screen Press Enter
4 Goto Bottom left corner, click F4 select viewname, on right hand side give table name
5 Press one more time F4, choose update , mark it X on right side.
6 save the transaction.
Thanks
sandeep
reward if helpful -
How to export data from a Oracle table to a delimited file?
I know how to load delimited file into a table, but how to export
data from a Oracle table to a delimited file?
Thanks in advance.Try looking at this link, it's long but there's three different solutions discussed in it. If you look at Barbara Boehmer's
solution in her posts in the link below you'll see that she's addressed your concerns with spool files.
Re: utl_smtp and triggers
Maybe you are looking for
-
OSX Mountain Lion says not compatible when it is. Advice please.
Hi. i am running OSX Lion 10.7.5 and waht to upgrade to mountain lion. i purchased this on my macbook via the app store and it downloaded no problem but when i go to download it on my mac pro tower its says the following.... "We could not complete yo
-
Hi experts, Iam trying to insert ITAB values into ZTABLE. While inserting the data <b>iam getting only the first record</b> into Ztable.(Actually i have 10records). What might be reason? I have 80 fields in Ztable. So iam using move corresponding. No
-
Records repeat in some column of final table
In my final table Some records are repeated in some columns . I have tried sorting and delete adjacent syntax. cant avoid repeating entries. Please give me some hint. <<Moved from MM forum to ABAP forum>> Edited by: Csaba Szommer on Feb 9, 2011 9:30
-
I hate tabs; how can I disable them permanently in Firefox 3.6.9?
It appears that someone decided to mandate tabs in Firefox 3.6.9. A Google search of 'disable tabs Firefox' shows page upon page that reflect many users' dislike of tabbed browsing. Count me amongst them. If possible, please suggest a workaround, a s
-
Migrating Oracle 9i As Portal??
Can I migrate Oracle 9i AS Portal from a computer to an another computer with hostname and domain differents? thanks null