Dbms_crypto package for number and date data type

Hi,
I am using Oracle 10g 10.2.0.3 on Linux 64 bit
I am tryiing to use dbms_crypto package for the first time to encypt my tables column
Following are my table columns
NAME1 VARCHAR2(2000),
ID1 NUMBER,
SCORE number
This table is already populated
i want to encrypt Name1 and Score column. Following are the functions i have created for Encryption and decryption.
--For Encryption
create or replace function get_enc_val
p_in in varchar2,
p_key in raw
return raw is
l_enc_val raw (2000);
l_mod number := dbms_crypto.ENCRYPT_AES128
+ dbms_crypto.CHAIN_CBC
+ dbms_crypto.PAD_PKCS5;
begin
l_enc_val := dbms_crypto.encrypt
UTL_I18N.STRING_TO_RAW
(p_in, 'AL32UTF8'),
l_mod,
p_key
return l_enc_val;
end;
--For Decryption
create or replace function get_dec_val
p_in in raw,
p_key in raw
return varchar2
is
l_ret varchar2 (2000);
l_dec_val raw (2000);
l_mod number := dbms_crypto.ENCRYPT_AES128
+ dbms_crypto.CHAIN_CBC
+ dbms_crypto.PAD_PKCS5;
begin
l_dec_val := dbms_crypto.decrypt
p_in,
l_mod,
p_key
l_ret:= UTL_I18N.RAW_TO_CHAR
(l_dec_val, 'AL32UTF8');
return l_ret;
end;
Key: I have stored a key in other schema and calling it by using function get_key().
Following is my insert
INSERT INTO Score_table VALUES
(get_enc_val('John',get_key()),25,get_enc_val(79,get_key()))
it is giving me following error
ORA-00932:Inconsistent Datatypes:Expected number got binary.
I checked, it is an error due to Score field, which is of number type. So do i need to change type of Score field to varchar or is there any other way to encrypt number and date field.
If i need to change the type then what will happen to the data already in Table and how do i encrypt data already in table.

Hi,
Is there any one who can tell me that, do i need to change my table column data type as the encrypted value will be character.

Similar Messages

  • In the packing list, batch number and expiry date is not appearing for a ma

    Dear Friends,
    I have an issue in the packinglist.
    In the packing list, batch number and expiry date is not appearing for a material.
    But in the delivery the batch number and expiry date is appearing.
    Why this has triggered and how to solve this?
    With regards

    Hi Vamsi,
              Please go through the output type Smart form or script programe of the packing list and check with the abaper If is there any Bug.
    Regard's
    Murali.

  • Creating a external content type for Read and Update data from two tables in sqlserver using sharepoint designer

    Hi
    how to create a external content type for  Read and Update data from two tables in  sqlserver using sharepoint designer 2010
    i created a bcs service using centraladministration site
    i have two tables in sqlserver
    1)Employee
    -empno
    -firstname
    -lastname
    2)EmpDepartment
    -empno
    -deptno
    -location
    i want to just create a list to display employee details from two tables
    empid firstname deptno location
    and same time update  in two tables
    adil

    When I try to create an external content type based on a view (AdventureWorks2012.vSalesPerson) - I can display the data in an external list.  When I attempt to edit it, I get an error:
    External List fails when attached to a SQL view        
    Sorry, something went wrong
    Failed to update a list item for this external list based on the Entity (External Content Type) 'SalesForce' in EntityNamespace 'http://xxxxxxxx'. Details: The query against the database caused an error.
    I can edit the view in SQL Manager, so it seems strange that it fails.
    Any advice would be greatly GREATLY appreciated. 
    Thanks,
    Randy

  • Incorrect version number and installation date of Firefox after upgrading

    My home desktop PC equipped with Mozilla Firefox v4.0 has recently been upgraded to v4.0.1 through an automatic updating. However, as noted from Windows 7 "Programs and Features", the latest version number and its installation date are not correctly shown. The required details refer to the previous v4.0.
    I look forward to having your technical advice as soon as possible.
    Andrew

    Hi, Alan
    Thank you for your prompt response.
    It seems to me that an automatic update of Firefox from v4.0 to v4.0.1 is not detected by Windows 7 > Programs and Features. Firefox > Show Update History and > About show the latest version number with the correct date of installation.
    At last, I re-installed Firefox into the existing version. I am pleased to inform you that Windows 7 shows the correct version number and installation date of Firefox as well as Revo Uninstaller.
    Perhaps, Firefox team would be kind enough to look into the matter. The problem did not happen in the past automatic updates.
    Regards,
    Andrew

  • HCM errors in phase Identify Objects for Transfer and Start Data Selection.

    Hello Colleagues ,
    Background: We are using TDMS HCM PA PD Expert package to transfer all of the HCM data
    We are using TDMS 4.0 SP 5. We are trying to do the Configuraition in Identify Objects for Transfer and Start Data Selection.. In this phase, we are encountering the issue of 'choose to confirm to trigger data selection'.  The only option in this activit is'confirm batch' and 'confirm online'. Even if we press the button, we are still encountering issues. What selections then or values can we use?Thank you. Kindly see screen shot
    Regards,
    Meinard

    Hello Meinard,
    There could be two issues:
    First check if you have assigned the target ranges for the dialog user which you are using to select data from sender system. You need to maintain target ranges in activity 'Define target ranges for users' which you can find under activity "Configuration and Utilities in Control system".
    Secondly, there could be authorizaton issues for the sender system user. Check for any authorization issue in SU53 in sender system for the user which you used to logon to sender system.
    Thanks
    Anita

  • I have order number and order date with me want to down load adobe creative cloud can you advise how to go about it

    i have order number and order date with me want to down load abode creative cloud on my desktop pls can you advise me how to go about it pls

    Creative Cloud Help / Creative Cloud for desktop
    https://helpx.adobe.com/creative-cloud/help/creative-cloud-desktop.html
    Creative Cloud Help / Sign out, Sign in | Creative Cloud desktop app
    http://helpx.adobe.com/creative-cloud/kb/sign-in-out-creative-cloud-desktop-app.html
    Creative Cloud Help / Install, update, or uninstall apps
    http://helpx.adobe.com/creative-cloud/help/install-apps.html
    Installing Creative Cloud Apps
    http://tv.adobe.com/watch/cs6-creative-cloud-feature-tour-for-video/installing-desktop-app s-from-creative-cloud/

  • TCODES FOR SENDINGIG AND RECEIVING DATA THROUGH ALE

    Hi,
    All,
    Message type I can find for the following :
    Equipment master: EQUIPMENT_CREATE
    Work centre: WORKC2, WORKC3 or WORKC4
    Functional location: FUNC_LOC_CREATE
    but i did'nt  find  a transaction code for sending and receiving data through ALE.
    For example:  Send material    T.code BD10,
                         Receive material T.code BD11.
    Please give the solution.
    Regards.

    can Tx BD21 is of any help

  • For block and unblock date .

    Hi All,
                 In me22n for standard PO  there are 2 Lock icons under Header details,
    In my Report the user wants that Lock icons  details to be appeared in output. (ie) for block and unblock date .....
    Kindly suggest me how to do it .....
    Your Valuable answers will be  rewarded .
    Regards,
    Vinoth.

    Hi Paras
    Try as below:
    data: l_lock type ICON_D value '@06@',
          l_ulock type ICON_D value '@07@'.
    write:/ l_lock as icon,
          / l_ulock as icon.
    Kind Regards
    Eswar

  • Best practice for Plan and actual data

    Hello, what is the best practice for Plan and actual data?  should they both be in the same app or different?
    Thanks.

    Hi Zack,
    It will be easier for you to maintain the data in a single application. Every application needs to have the category dimension, mandatorily. So, you can use this dimension to maintain the actual and plan data.
    Hope this helps.

  • Cheque Number and Cheque date

    Hi All,
    Can anyone let me know in which table I can get Cheque Number and Cheque date fields.
    Regards,
    Sandy

    Hi,
    Please check table PAYR and field CHECT and ZALDT.
    Regards,
    Ferry Lianto

  • Are there LabView VI's for accessing and writing data to a CDF?

    I am currently trying to develop a data acquisition system using LabView to acquire the data and to write the data to a file in NSSDC's Common Data Format (CDF). The CDF distribution (Windows 2000) comes with a precompiled dll of the CDF library of functions. Unfortunately, LabView crashes when I try to use the Call Library Function node. I am confident that it is not a function prototype error, but it may be that the CDF library is not thread-safe.
    Has anyone developed VIs for writing and accessing data in CDF format?
    Does anyone know how I can determine why the Call Library Function node causes LabView to crash when it uses a particular dll? There are a host of reasons given in the "Using External Co
    de" manual, but no apparant way of determining which one is the culprit.

    Thank you for your response. Actually, I have solved the problem by recompiling the source code for the CDF distribution using the Cygwin development environment. Cygwin provides a unix C compiler and linker which can create Windows executables and dlls. After modifying the makefiles that came with the CDF distribution I was able to build the dll and then use the Call Library Module to access the CDF functions.
    A note about this process: the linker that Cygwin exports both Windows-style and C-style functions when it creates the dll. Be carefull not to use functions that end in underscores from the CDF dll as C-style functions.
    Also, I would like to point out that the current faliure method of the Call Library Module (i.e. crashing LabView) is not acceptable.
    It would be much better if LabView would generate an error message or an error log entry in case of a dll failure. I would hope that this scenario would be a target goal for future development of LabView. The Call Library Module is an incredibly powerful tool in that opens up many avenues of development -- it deserves a better way diagnosing problems.

  • Does EBS license include tools for reporting and extracting data (queries)

    Hello,
    I'm recommending Oracle EBS to a customer and I need to mention what tools for reporting and extracting data (queries) are included in a Oracle EBS license.
    I hope you can help me with that information, or at least with providing me the place where I can get the info.
    Thanks in advance,
    A/P Sergio Maestri

    Hi,
    Thanks, I think the same ... but the customer asked me about it ... I supose my answer will be that he can use Reports Builder for reporting and Toad or PLSQL Developer to access to the database and make queries ...
    What about XML Publisher ? ...it can be used to make reports against an Oracle EBS database and integrate them into the EBS Application ?I believe you need a developer license to use Oracle Developer (Forms/Reports) for customizing/creating reports.
    Global Pricing and Licensing
    http://www.oracle.com/corporate/pricing/index.html
    And IINM, the same thing applied to XML Publisher -- See this thread for a similar discussion.
    eBiz & XML Publisher - Confusion
    http://forums.oracle.com/forums/thread.jspa?messageID=3834445
    Please contact your Oracle sales representative, he/she is the best one to answer such questions.
    Thanks,
    Hussein

  • Copy controls is not copying the order reason and PO numbe and PO date

    Hi All,
    When i create credit memo request with reference to Invoice, it is not copying the order reason PO number and PO date to credit memo request from invoice.
    Please let me konw what changes do i need to copy that.
    Thanks in advance.

    Hi,
    Check below link
    copy purchase order number and date from one sales order to other sales ord
    Hope it'll help you !
    Best regards,
    Anupa

  • Create material serial number and update class type and class

    Hi ,
    do we have any function to create material serial number and update class type, class and Characteristic Description?
    for transcation IQ04 0-Create material Serial number and IQ02 for change mat. serial number
    cheers,
    RAAG

    hi
    u  can  go to  iqo2 and click  class overview and assign the class type ,class and description.but u need to maintain  class for this first.
    it would be helpful for u  to  read iut  221 for work management
    for creation  of class,service object  etc.and understand the concept .
    all the best
    kr
    raj
    RAJ on Oct 14, 2008 3:20 PM

  • Package for InCopy and Email

    I am having trouble with "Package for InCopy and Email" in CS6 on a Mac 10.6.8. My default email is Outlook 2011. I get a blank message window when I try use this option. I end up manually creating the assignment and emailing it. But I would prefer for the email window to open with the package automatically attached. It started happening when I upgraded to CS5.5 and also upgraded from Entourage to Outlook email app. Any thoughts to resolve this issue?

    Adobe didn’t say anything, I did. And I didn’t say it was Microsoft, I said it sounded like an issue with the email program.
    Where does that leave you? Looking for the cause.
    Does any other program cause this? Do you have Acrobat installed? Try to attach a PDF to an email and see if it works.
    Bob

Maybe you are looking for

  • Caller ID not working on 3.1.3

    A couple of months ago I upgraded to 3.1.3 and Caller ID stopped working on phone calls. It still works for SMS messages. I've checked with my carrier (Telecom in New Zealand) that caller ID is active on my account. It worked perfectly when the phone

  • SQL Query not using Composite Index

    Hi, Please look at the below query: SELECT pde.participant_uid ,pde.award_code ,pde.award_type ,SUM(decode(pde.distribution_type ,'FORFEITURE' ,pde.forfeited_quantity * pde.sold_price * cc.rate ,pde.distributed_quantity * pde.sold_price * cc.rate)) A

  • Http Header for a SOAP message using SAAJ.

    Hello java community, I need to set the 'SOAPAction' field in the HTTP Header of a soap message. I am using SAAJ to build the message. Does anyone know how to do this? Help is greatly appreciated as always.

  • JTree custom renderer - JScrollPane

    Hi, I am building a JTree and need a custom renderer that will allow me to display the contents of certain leaf nodes in a JEditorPane that is contained in a scrollpane as the leaf may contain a varying amount of text. I have managed to get a rendere

  • What are the exact difference between the versions

    Please tell what are the differences between all the versions of SAP R/3. All the old to the lastest one. thankyou.