How come there is no trigger on select in Oracle

I'm encrypting a value on insert into the table:
insert into table1 (name, ssn) values ('John Smith','123-45-6789');
ssn value gets encrypted and stored either in ssn_enc column or in a separate table on insert trigger.
But now I want to use:
select name, ssn from table1;
And get the decrypted value out. So that's where a select trigger would fit nicely.
Do I really need to complicate it with an overlaying view?
P.S. I have to use this type of encryption, because Oracle Streams do not support TDE in Oracle 10g, and we are replicating encrypted data.

@wateenmooiedag: Sorry didn't see you also mentioned DBMS_ADVANCED_REWRITE. ;)
I made a small testcase to show that DBMS_ADVANCED_REWRITE indeed works as expected:
SQL>  create table table1 (name, ssn) as select 'John Smith' name, to_char(to_clob(dbms_crypto.encrypt(utl_raw.cast_to_raw ('123-45-6789'),1 + 256 + 4096,utl_raw.cast_to_raw('michaels')))) ssn from dual
Table created.
SQL>  select name, ssn from table1
NAME                           SSN                                    
John Smith                     F9B1AEECF8B836BFB4C4B555C3922EE9       
1 row selected.
SQL>  begin
   sys.dbms_advanced_rewrite.declare_rewrite_equivalence
      ('sal_rewrite',
       'select name, ssn from table1',
       'select name, utl_raw.cast_to_varchar2(dbms_crypto.decrypt (ssn, 1 + 256 + 4096, utl_raw.cast_to_raw (''michaels''))) ssn from table1',
       false,
       'general'
end;
PL/SQL procedure successfully completed.
SQL>  alter session set query_rewrite_integrity = trusted
Session altered.
SQL>  select name, ssn from table1
NAME                           SSN                                    
John Smith                     123-45-6789                            
1 row selected.

Similar Messages

  • How come there is no sound coming from itunes 10.3.1?

    how come there is no sound coming from itunes 10.3.1? i have tried various time installing & unistalling the program.
    i tried looking to find ways to fix this problem but nothing has seemed to work with the problem. I also tried restarting my computer and its still the same problem. this all started when i updated my itunes to the newer version of itunes. the player shows the song i have selected & it shows the song playing but there is no sound. please anything will help.

    Try some of these suggestions:
    http://h10025.www1.hp.com/ewfrf/wc/document?docname=c01912228&lc=en&cc=us&dlc=en
    Reminder: Please select the "Accept as Solution" button on the post that best answers your question. Also, you may click on the white star in the "Kudos" button for any helpful post to give that person a quick thanks. These feedback tools help keep our community active, so you receive better answers faster.

  • When viewing the weather default app with multiple cities, how come there isn't a one click shortcut to go back to the first city?

    When viewing the weather default app with multiple cities, how come there isn't a one click shortcut to go back to the first city?

    3.2 you can make multiple clocks, each clock can have a different alarm.

  • HT204053 how come there is another apple id appears when im about to update the applications that i have downloaded?

    how come there is another apple id appears when im about to update the applications that i have downloaded?

    When a stranger's Apple ID appears on your Mac in conjunction with an update for an app that you have never installed, you have a pirated app on your Mac. The pirated app is not the app calling for the update. This pirated app has been cracked with the MAS receipt from usually a free app, often Angry Birds or Twitter, acquired by the person whose Apple ID you see.
    You may not have realized that it was a pirated app when you installed it. You may have believed that it was a trail version or a "free" version.
    All MAS apps have a MAS receipt in their app bundle. Check any app acquired from the MAS. Right click on the app's icon in your Apps folder and choose Show package contents. In the Contents folder is a _MASReceipt folder and in that folder is the coded MAS receipt. It has the Apple ID of the MAS account that bought/acquired the app from the MAS. It is that receipt that the MAS uses to alert you that an app has an update. There would not be a notice of an update with someone else's Apple ID showing in the MAS on your Mac, if there was not an app with a receipt from this person's account somewhere on your Mac.
    Download the free app FindAnyFile (FAF);
    http://apps.tempel.org/FindAnyFile/
    This app is easier to use and seems to be more powerful than Spotlight. Open FAF and in the box type _MASReceipt and press Find. It should come up with a list of every app on the Mac with a MAS receipt. Compare the apps with receipts in FAF's list with your purchased apps list in the Mac App Store. The odd app out should be the pirated app.

  • How come there are no hidden objects games in the South African App Store and y does safari not allow you to get it downloaded from the net. There are only games for kids in the App Store. Can anyone help

    How come there are no hidden objects games in the South African App Store and y does safari not allow you to get it downloaded from the net. There are only games for kids in the App Store. Can anyone help.  Is the South African apple ipad only for children

    Nobody here is responsible for what is or is not available in any country. I believe it is a software licensing thing.

  • How come there is no "Safety Lock" icon when you are accessing your personal bank info?

    How come there is no "safety lock" icon picture in the tool bar when your accessing personal banking info. On other browsers, it shows that the Internet line is secure (the Lock icon) is in the address line. There's nothing on using Firefox.

    Padlock is no longer part of Firefox; it was removed beginning in Firefox 4. The padlock shows that there is a secure connection but does not supply additional information. You could have made a typographical error and still have been connected to a secure connection. The padlock was replaced in Firefox 3 with the Site Identity Button. Familiarize yourself with the Site Identity Button at the left end of the Location Bar:
    *https://www.mozilla.com/en-US/firefox/security/identity/
    *https://support.mozilla.com/en-US/kb/Site+Identity+Button
    *http://www.dria.org/wordpress/archives/2008/05/06/635/
    You can install this add-on if you wish:
    *https://addons.mozilla.org/en-US/firefox/addon/padlock-icon/
    You are using Firefox 5. The most current version of Firefox is 8. Consider updating as Firefox 5 is not longer updated/maintained and contains security issues that will not be corrected.
    *See --> https://support.mozilla.com/en-US/kb/Updating+Firefox?bl=n&s=update%20automatically
    Not related to your question, but...
    You may need to update some plug-ins. Check your plug-ins and update as necessary:
    *Plug-in check --> http://www.mozilla.org/en-US/plugincheck/
    *Adobe Shockwave for Director Netscape plug-in: [https://support.mozilla.com/en-US/kb/Using%20the%20Shockwave%20plugin%20with%20Firefox#w_installing-shockwave Installing ('''''or Updating''''') the Shockwave plugin with Firefox]
    *Adobe PDF Plug-In For Firefox and Netscape: [https://support.mozilla.com/en-US/kb/Using%20the%20Adobe%20Reader%20plugin%20with%20Firefox#w_installing-and-updating-adobe-reader Installing/Updating Adobe Reader in Firefox]
    *Shockwave Flash (Adobe Flash or Flash): [https://support.mozilla.com/en-US/kb/Managing%20the%20Flash%20plugin#w_updating-flash Updating Flash in Firefox]
    *Next Generation Java Plug-in for Mozilla browsers: [https://support.mozilla.com/en-US/kb/Using%20the%20Java%20plugin%20with%20Firefox#w_installing-or-updating-java Installing or Updating Java in Firefox]

  • How come there isn't a comma between the city and state when I go to make an envelope with an address book contact?

    How come there isn't a comma between the city and state when I go to make an envelope with an address book contact?

    On an envelope, there's not supposed to be. The US Postal Serveice prefers no punctuation, which can interfere with machine sorters. USPS Address Format

  • HT4623 how come there is no new update for my ipod touch i have been at 2.2.1 for 2 years

    i have an ipod touch and every time i go to update it says that i am at the latest version well its going on 2years and im still stuck at 2.2.1

    See the chart below to determine whether you can upgrade your device and what you can upgrade to. If you do not have a Software Update option present on your iDevice, then you are trying to upgrade to iOS 5 or higher. You will have to connect your device to your computer and open iTunes in order to upgrade.
    IPhone, iPod Touch, and iPad iOS Compatibility Chart
         Device                                       iOS Verson
    iPhone 1                                      iOS 3.1.3
    iPhone 3G                                   iOS 4.2.1
    iPhone 3GS                                 iOS 6.1.x
    iPhone 4                                      iOS 6.1.x
    iPhone 4S                                    iOS 6.1.x
    iPhone 5                                      iOS 6.1.x
    iPod Touch 1                               iOS 3.1.3
    iPod Touch 2                               iOS 4.2.1
    iPod Touch 3                               iOS 5.1.1
    iPod Touch 4                               iOS 6.1.x
    iPod Touch 5                               iOS 6.1.x
    iPad 1                                          iOS 5.1.1
    iPad 2                                          iOS 6.1.x
    iPad 3                                          iOS 6.1.x
    iPad 4                                          iOS 6.1.x
    iPad Mini                                     iOS 6.1.x
    =====================================
    Select the method most appropriate for your situation.
    Upgrading iOS
       1. How to update your iPhone, iPad, or iPod Touch
       2. iPhone Support
       3. iPod Touch Support
       4. iPad Support
         a. Updating Your iOS to Version 6.0.x from iOS 5
              Tap Settings > General > Software Update
         If an update is available there will be an active Update button. If you are current,
         then you will see a gray screen with a message saying your are up to date.
         b. If you are still using iOS 4 — Updating your device to iOS 5 or later.
         c. Resolving update problems
            1. iOS - Unable to update or restore
            2. iOS- Resolving update and restore alert messages
    iOS 3 is a paid upgrade. See Update iPod Touch 3.1 Firmware For Free How to Update iPod Touch ....

  • HT4623 How come there is no software update button on my ipod 4th generation?

    I am going to settings>General .... but then there is no software update button. My home button is stuck so i want to update my ipod to activate the assistive touch. Please help!

    sydneyfrommb wrote:
    .... but then there is no software update button.
    That is only a feature of iOS 5 or later...
    If you have iOS 4... See Here...
    http://support.apple.com/kb/HT4972
    OR...
    Connect to iTunes on the computer you usually Sync with and “ Check for Updates “...
    If an Update Appears Install it... if not... you are up to date for your particular Device...
    See the Using iTunes Section Here...
    How to update your iPhone, iPad, or iPod touch

  • Notes - how come there is no tab of access in iTunes?

    How do I get a word document onto my iTouch?
    (have XP SP3)

    Unfortunately the only way right now is to mail it to yourself. There is also some 3rd party programs that lets you use your touch as a hard disk, but you can't access the files from the touch then. If you go with the mail-to-myself solution be aware that you cannot edit the word file - only read it.
    This is maybe going to change with the app store since there is a lot of people who asks for better PDA functionality - my guess is that there will be some app available that suites your needs in the near future - but again - only guessing here...
    hope this helps

  • How come there is no longer a short cut for firefox on my desktop? I switched to firefox 6 yesterday, and that's when I came across this problem.

    Also, when I click start firefox used to be there, so I just had to click it, now that is gone as well. There is no longer a folder for mozilla firefox on my desktop either. To get on firefox I had to use another browser to redownload it every time I want to use it.

    Create a new smart mailbox. Does it sync? If not, do as below.
    Back up all data.
    1. Triple-click the line below on this page to select it:  
    ~/Library/Mail/Bundles
    Right-click or control-click the highlighted line and select 
    Services ▹ Open
    from the contextual menu. A folder may open, or you may get an error message that the item can't be found. Either result is normal. If the folder does open and has contents, move the contents to the Desktop. Relaunch Mail and test. If there's no change, put the contents of the folder back and quit Mail again.
    2. Repeat with this line:
    /Library/Mail/Bundles
    This time you may be prompted for your login password when you remove the items. Make sure they're removed from the folder and not just copied to the Desktop. If necessary, copy them first and then move the originals to the Trash.

  • How come there's only an app for LA???

    There should be an app for the orange county transportation authority. There is one for the LA transit system but not orange county.

    Could it be that LA Transit has made an iPhone app and Orange County has not?
    Matt
    EDIT: Looks like they have an Android app.
    https://play.google.com/store/apps/details?id=org.busbrothers.anystop.orangecoun ty&hl=en
    Maybe iPhone is not far behind?
    Message was edited by: Matthew Morgan

  • How come there is no publishing authority on the internet?

    '''Locked by a moderator with input from an admin. This is a Firefox Support forum, not a place to vent. Please find another forum to post this in.
    I can go to millions of sites that have illegal and offensive content on the internet.
    I feel betrayed as someone who has spent thousands of dollars on a computer and 1000s of hours working on my computer and browsing the internet because there does not exist security measures to keep dangerous content and people from providing content that I would otherwise object to on my computer.
    Thus I do not understand why companies like microsoft who hold a huge share of computer industry do not take responsibility for the safety of its customers. Like wise I am sceptical of companies like google who claim to be a reputable company/corporation however they index and provide links to all these illegal sites I am talking about.
    I am aware of the existence of content filters however I don't believe that having to pay for my security after I have shelled out thousands of dollars for a computer supposedly to be an expression of modern technology that does not have the capacity to maintain decency and appropriateness.
    If websites were to be subject to censorship it would make the internet more useful and ultimately safe - it would be a simple task to employ a team of people to maintain a database of active websites and to review and censor material based on its content. This would make the internet much more viable as a universal tool for modern day business and communication because illegal and deviant material would not be able to be accessed beyond the regulations that need to be developed.
    Google is a perfect example of indexing gone wrong - there is no censorship - any review of websites is pointless because you can toggle access easily through the browser. I believe that internet browsers should be regulated to censor the material accessed. I believe as a user that I have the right not to be subjected to the abuses of evil and degenerate people on the internet. I finally conclude that access to such disgusting content should be available through hacking out a programs default security and voiding of rights of that user to any protection from dangerous material.
    I believe the internet should be censored because there is so much non-constructive material on the internet and it serves as a distraction and detriment to a person's well being.
    A user has the right to their own security and dignity - such development would be worthwhile because it will help to save countless people who would otherwise have to go through disturbing experineces such as I have with internet browsers...
    Thanks for your time :)
    indexing and publishing !!!

    How is that related to Firefox support?
    Sorry, this is not a forum for entertaining a discussion of what is and isn't right about the internet. The tools for blocking objectionable content are out there, it is up to the individual user to use those tools, or not. Bottom line is freedom of choice, and this country defends that for all citizens - pervs included.

  • How come there r 3 of the same albums on my ipod

    so i have 3 of the same albums in my ipod each identical and i saw no problem w/the documents or files in itunes wut is wrong?

    Press command + option + esc keys together at the same time.
    Wait.
    When Force Quit window appears, select the application if not already.
    Press Force Quit button at the bottom of the window.
    Wait.
    Application will quit.
    If this does not help, press the power button for 7 or more seconds.
    Computer will shut down.
    Restart.
    http://support.apple.com/kb/HT3411

  • How come there is no ios7 for an ipod touch 4

    Why is there no ios7 for ipod touch 4th generation i mean most people that have ipod touches have the 4th generation so now everyone wants to chuck it in the bin cause there is no ios 7 for 4th generation ipod touch

    Why do you feel you need to chuck it in the bin? Does it not work now with iOS 6 installed? Has its capabilities suddenly changed?

Maybe you are looking for

  • Crystal reports - Create Report from SAP Bex Query

    I have installed the Crystal reports 2008 for a trial period and the sap integration kit. I have created a new report from a sap query and I am trying to format the report. I would like the columns headings be similar to Bex query - Current Month Jan

  • Sending a Pages document as an email but not an email attachmentt

    using iwork '08 and a pages newsletter template, is there a way to send a pages document as an email without making it an attachment? for business a newsletter is better for clients if it arrives in the email as the body of the email instead as in th

  • Functional Question regarding SD

    Hello everyone,                I have a question about creation of a billing document.  Is it possible to put condition lines without entering line items on a billing document?  Not sure if this would be a standard thing to do in all companies or may

  • Gnome-settings-daemon-updates: missing!

    Hello everyone! Since when I started to use Arch I have always been using PackageKit's Pacman integration + GNOME Packages updates notifications happily. Unfortunately, now the updates daemon has been removed from the [community] repository. The pack

  • Managing NI-DAQ 7.0.1 Distribution Size

    NI-DAQ 7.0.1 distribution is huge 639MB! I do not need all of the programs that are included in the distribution directory. Is there a way I can modify the setup program not to include the programs that I do not need thereby shrinking the file size s