How to copy table data from onde DB to another DB using clipboard

HI,
i copied table data from one DB to another DB, but it displays an error as "policy with check option violation" when inserting the table data.. so how to resolve the proble.. thanks in advance.

DECLARE
log_utl_dir VARCHAR2(100) :=('/apps/home/cmsftp/log/gaa');
CURSOR tb_compy_cur is
select tb.compy_acronym
-- QC 158113 - added below
,tb.ivr_plan_num
from tb_fc_compy tb,tb_xop_entitlements te
where tb.grant_award_accept_flag = 'Y'
and tb.ivr_plan_num = te.ivr_plan_num
and te.entitle_name = 'GAA_RECONCILED'
union all
select compy_acronym
-- QC 158113 - added below
,tb.ivr_plan_num
from tb_fc_compy tb
where tb.res_stock_flag = 'Y'
--and   (tb.res_auto_lapse_flag = 2 OR
--tb.res_auto_lapse_flag = 3)
and exists (select entitle_name from tb_xop_entitlements te
where tb.ivr_plan_num = te.ivr_plan_num
and te.entitle_name = 'GAA_RES_FLAG'
and te.optionee = 'Y'
and te.psrep = 'Y'
and te.sponsor = 'Y'
and te.advisor = 'Y');
v_xopgrantz_insertcount NUMBER := 0;
-- QC 158113 - added below
v_xopgrantz_accpt_count NUMBER := 0;
v_user_id VARCHAR2(30);
insert_file_id UTL_FILE.FILE_TYPE;
insert_log_file varchar2(45) := 'xop_grantz_insertstats.log';
BEGIN
DBMS_OUTPUT.PUT_LINE('success1');
insert_file_id := UTL_FILE.fopen(log_utl_dir,insert_log_file,'w');
UTL_FILE.put_line(insert_file_id,'Starting the Process at '|| CURRENT_TIMESTAMP);
UTL_FILE.put_line(insert_file_id,'INSERTING ROWS FOR Companies turned on for GAA_RECONCILE and GAA/RESSTOCK');
for compy_rec in tb_compy_cur loop
v_user_id := 'CMS'||compy_rec.compy_acronym||'_USER';
ctx_set_session.set_user_session(v_user_id);
dbms_output.put_line ('success2'||''|| v_user_id);
INSERT into xop_grantz(grant_num,
user_id,
last_user_id,
restrict_grant,
child_symbol,
parent_grant_flag,
bulking_overide_flag,
exerrestrict_code,
rounding_method,
exercisiable_dt,
def_res_units_flag,
opt_gain_def_elig_flag,
opt_gain_deferred_flag,
opt_gain_deferred_dt,
opts_accepted,
lst_updtby_usercd,
accepted_type,
GAA_eligible,
GAA_LST_UPDTBY)
select g.grant_num,
v_user_id,
'GRNTACCPT',
'N',
'N',
(sel ect code
from tb_xop_exerrestrict_codes
where cash_allowed = 'Y'
and cashlesshold_allowed = 'Y'
and cashlesssell_allowed = 'Y'
and stockswap_allowed = 'Y'
and restricted_allowed = 'Y'
and sar_allowed = 'Y'
and cashmargin_allowed = 'Y'
and cashpartial_allowed = 'Y'
and sarsale_allowed = 'Y'),
NULL,
'N',
'N',
'N',
NULL,
NULL,
NULL,
'N',
NULL,
NULL
from grantz g
where not exists(select 1
from xop_grantz xg
where xg.grant_num = g.grant_num);
v_xopgrantz_insertcount := SQL%ROWCOUNT;
dbms_output.put_line ('1');
-- QC158113 - Optimisation fix--starts
DELETE FROM gt_xop_grant_accpt_type;
INSERT INTO gt_xop_grant_accpt_type
SELECT g.grant_num,e.ivr_plan_num,
pk_xop_grntaccpt.fn_get_accpt_type (v_user_id,
g.plan_num,
g.grant_dt,
g.opt_num,
g.grant_cd,
g.plan_type,
'Y'
FROM grantz g,tb_xop_entitlements e
WHERE plan_type IN (2, 4, 5, 7, 8)
and g.user_id = v_user_id
and e.ivr_plan_num = compy_rec.ivr_plan_num
and entitle_name = 'GAA_RES_FLAG' ;
dbms_output.put_line ('success3');
v_xopgrantz_accpt_count := SQL%ROWCOUNT;
UTL_FILE.put_line(insert_file_id,'Inserted count in gt_xop_grant_acceptance '|| v_user_id||v_xopgrantz_accpt_count);
-- QC158113 - Optimisation fix--ends
COMMIT;
UTL_FILE.put_line(insert_file_id,'Inserted count in XOP_GRANTZ for USER_ID '|| v_user_id||v_xopgrantz_insertcount);
ctx_set_session.set_user_session('');
dbms_output.put_line ('process completed');
end loop;
UTL_FILE.fclose(insert_file_id);
EXCEPTION
when others then
rollback;
dbms_output.put_line ('Code '||SQLCODE||':'||SQLERRM||' at '||v_user_id||' .pr_xopgrantz_insert');
pr_xop_log_errors('Code '||SQLCODE||':'||SQLERRM||' at '||v_user_id||' .pr_xopgrantz_insert');
pr_xop_log_errors('Code '||SQLCODE||':'||SQLERRM||'INSERTING into xop_grantz for ALL grants');
END;
i received this error when running the procedure also, so the table gt_xop_grant_accpt_type is not populated
{Code -28115:ORA-28115: policy with check option violation at CMSFB_USER .pr_xopgrantz_insert}

Similar Messages

  • How to transfer table data from one client to another client?

    How to transfer table data from one client to another client?

    Hi,
    Look at the Blog
    /people/community.user/blog/2007/01/07/transport-table-entries
    Regards
    Sudheer

  • How to copy the data from one database to another database without DB link

    Good Day,
    I want to copy the data from one database to another database with out DB link but the structure is same in both.
    Thanks
    Nihar

    You could use SQL*Plus' COPY command
    http://technology.amis.nl/blog/432/little-gold-nugget-sqlplus-copy-command
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14357/apb.htm#sthref3702
    Edited by: Alex Nuijten on Sep 16, 2009 8:13 AM

  • How to copy game data from one device to another

    I downloaded Injustice: Gods Among Us onto an iPhone 5 and I wanted to have all of my save data copied onto the iPhone 5. The same iCloud account is used on both devices and I recently backed up my iPhone 4. I want to know how to copy (if there is a way) my game data onto the iPhone 5. Is there a way I can just copy the game data and nothing else to the iPhone 5?

    There is no way to just copy the game data. Game data is saved as part of the backup, and the only way to transfer it is to restore the new phone from a backup of the old phone. Just remember, anything that you have done on the new phone since the backup of the old phone will be deleted.

  • How to copy form data from one pdf to another?

    Hi,
    I have created a pdf, added form data to it. Saved the form data as a fdf file - all good.
    I've updated the document and saved as a new pdf and would like to load the fdf data into it.
    So I select tools - forms - more forms options, and press the "import" function  - it goes grey and nothing happens.
    If I re-open the document the import function remains greyed out.
    I can find no way to import this data.... any ideas?
    I've tried going into form edit mode - adding a new field.  The import option is no longer greyed out so I click it and can select the fdf file hit open and ... the dialogue disappears and nothing happens.
    Is my Acrobat XI 11.0.07 badly installed - or what?

    You need to learn about the different types of PDFs. PDF/ A is an archive format that does not allow changes. PDF/X is used for graphics exchange
    For forms I would use only the PDF with a target version. Do not use the Optimizer feature.
    Forms always become larger due to the need to include the font for the various form fields. You might have to review the type fonts used by the form fields and one standard font as much a possible.
    It is possible to use the FDF file to move field values from one PDF to another.
    If you are trying to replace the underlying content and keep the form fields, use the replace pages.

  • Copy the data from one column to another column using @

    I have two columns here - A and B.
    Column A has a complicated formula that will generate results. I wanted the results in Column A to be reflected in Column B without pasting the A's formula in B. This will save me the trouble of editing formulas in more than 1 column if there is a need.
    I saw somewhere that you can use "@" in column B but I have no idea how to use it.
    Assumingly column A is the first column. I tried to insert '@1' in B's formula and change B's column properties' Data Format as "Treat Text as HTML". It does not work.
    Please advise how I can do that.

    So is there any way to copy the data in Column A into Column B without putting the same formula? something like in Excel where we put "=C1". Its not possible in BI as it comes in excel.....The only way is to create a duplicate column in RPD or Answers screen and incorporate the formula and giving different name to it.
    whats the problem if you duplicate the column with same formula?....Ok still if you dont want to see identical just write some pseudo logic say
    Duplicated column f(x) case when 1=0 then column_name else formula end.....so it appears different to see but it outputs same.
    UPDATED POST
    Dont create in RPD,you can create a dummy column in that report request and change the f(x) to the above case i mentioned by taking the column from columns button in edit formula screen so when ever you edit the actual column formula that would reflect in the dummy column also as it is replicating from original one.Try and see
    hope helps you.
    Cheers,
    KK
    Edited by: Kranthi.K on Jun 2, 2011 1:26 AM

  • How to transfer app data from one mac to another without using syncing of the iphone?

    Right, recently I have tried to change which computer my Iphone syncs with so that my older mac can be sold or disposed of in some profitable form. I have successfully synced all of my music off of one mac onto another via home sharing at which point I connected my phone to my new computer which suggested that the phone needed a software update. Immediately after doing this I realised that my updated Iphone 3GS would no longer sync to my old computer and attempted to sync it just to confirm this- it failed and stated that the iphone could only sync with itunes 10.1 which is a higher spec than that mac can hold. I then feeling doubtful that things would work out tried to carry on as if this problem were absent but I later discovered that I could only transfer the apps that I had synced to my phone to my new mac and all unsynced apps appeared lost because as I stated previously I could not sync with my older mac which contains all of their data. I have consulted the online apple manual for the phone and all it states is the method of transferring purchases in itunes which I tried and is what lead to the copying of my synced apps on to my new mac. What I am asking is is their anyway that I can 'cheat' so to speak at app transfers. I know that somewhere on my old mac the files are stored with the information of the lost apps but I cannot locate them and would not know how to merge them into my newer itunes if I were to copy and paste them to a memory stick (assuming that this is the right method) Other than this is their any other way of downgrading the upgrades of an iphone or somehow tricking itunes into running a higher update than the computer spec? I've tried all I can and this is really annoying- please help!!!!!!

    I'm not entirely sure what you're asking... I'll have to look on my Mac at home to see exactly where they are, but you should just be able to copy all the apps from your old machine to thumb drive or over the network and put them in iTunes on the new one, then sync. Right click on one of the apps in your iTunes library and choose Show in Finder. That will point you to where they are.
    If you're asking how you can do this and maintain data contained 'within' the apps themselves (high scores, game progress, etc), I don't think there's any way you can do that.

  • How can I Move data from one column to another in my access table?

    I have two columns, one that stores current month’s data and one that stores last month’s data. Every month data from column 2 (this month’s data) needs to be moved to column 1 that holds last month’s data. I then null out column 2 so I can accumulates this month’s data.
    I understand how to drop a column or add a column, how do I transfer data from one column to another.
    Here is my trial code:
    <cfquery name="qQueryChangeColumnName" datasource="#dsn#">
      ALTER TABLE leaderboard
      UPDATE leaderboard SET  points2 = points3
    </cfquery>
    Unfortunately, I get the following error:
    Error Executing Database Query.
    [Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver] Syntax error in ALTER TABLE statement.
    How can I transfer my data with the alter table method?

    I looked up the Access SQL reference (which is probably a
    good place to start when having issues with Access SQL), and
    it suggests you probably need a WHERE clause in there.
    I agree the documentation is a good place to start. But you should not need a WHERE clause here.
    Too few parameters. Expected 1.
    If you run the SQL directly in Access, what are the results? At the very least, it should provide a more informative error message..

  • How can I transport data from one client to another client?

    How can I transport data from one client to another client? 
    Regards,
    Subho

    hmmm, CTS = cutomizing transport?
    If you have a customizing table, there are still two possibilities.
    1. customize in DEV system and transport
    2. customize right there where you need it.
    this depends on how the maintainance view is built. If it is a simple customizing table and you get not asked for a TR when customizing a new record or changing an existing one, you hit possibility 2.

  • How to copy List item from one list to another using SPD workflow using HTTP call web service

    Hi,
    How to copy List item from one list to another using SPD workflow using HTTP call web service.
    Both the Lists are in different Web applications.
    Regards, Shreyas R S

    Hi Shreyas,
    From your post, it seems that you are using SharePoint 2013 workflow platform in SPD.
    If that is the case, we can use Call HTTP web service action to get the item data, but we cannot use Call HTTP web service to create a new item in the list in another web application with these data.
    As my test, we would get Unauthorized error when using Call HTTP web service action to create a new item in a list in another web application.
    So I recommend to achieve this goal programmatically.
    More references:
    https://msdn.microsoft.com/en-us/library/office/jj164022.aspx
    https://msdn.microsoft.com/en-us/library/office/dn292552.aspx?f=255&MSPPError=-2147217396
    Thanks,
    Victoria
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • How can you transfer data from one ipod to another ?

    How can you transfer data from one ipod to another ipod ?

    The geniusbar told me what to do, I understood but there is still a problem for me >:/ It's not showing up though. Like "device."  Nothing is happening, and I tried as soon as I got home. Then after half an hour, then an hour, then 3 hours. My problem is that it's not showing up! It's stuck in recovery mode! There's still like 25% battery. So I have no idea why.

  • How do I transfer data from one iPhone to another?

    How do I transfer data from one iPhone to another?

    If your old device is an Apple using iOS 5 or later, and you have an iCloud account, you can transfer all your saved messages, email accounts, photos, notes, and other personal settings to your new iPhone.
    Here's how...
    Connect your old Apple device to WiFi and to a power source.
    Back it up to iCloud by going to Settings > iCloud > Storage & Backup and toggling iCloud Backup on. The time it takes to ba ckup depends on how much data you have and on the speed of your internet connection.
    iCloud backs up your device once a day. If it needs backing up before you transfer to your new iPhone 5, tap Back Up Now in Settings > iCloud > Storage & Backup. Do not start transferring before the backup is finished.
    Turn on your new iPhone and complete the setup by selecting your language and country, and choose whether to enable Location Services. When prompted, choose your WiFi network.
    When prompted to set up, choose Restore from iCloud Backup, tap Next, and enter your Apple ID and password.
    Select the backup of your old device and tap Restore. Wait until the device has finished restoring from the backup.
    When the restore process is complete, your iPhone will restart and be ready to use.
    Connect your iPhone 5 to iTunes to sync data not contained in the backup (such as music, videos, apps, and so on). You can choose the data that are synced by clicking the syncing tabs in iTunes.

  • How do i backup data from one iphone to another

    how do i backup data from one iphone to another?

    Back up your old phone, then restore your new one from the backup.  See http://support.apple.com/kb/HT2109.

  • HOW TO TRANSFER HISTORICAL DATA FROM ONE ACCOUNT TO ANOTHER

    제품 : FIN_GL
    작성날짜 : 2006-05-29
    HOW TO TRANSFER HISTORICAL DATA FROM ONE ACCOUNT TO ANOTHER
    =============================================================
    PURPOSE
    특정 기간의 Balance 를 Account 별로 Transfer 하는 방법에 대해 알아 보도록 한다.
    Explanation
    GL 의 Mass Maintenance 기능을 이용하면 한 Account 에서 다른 Account 로 혹은 Multiple Account 에서 다른 하나의 Account 로 Balance 를 이동 시킬 수 있다.
    1. GL Responsibility 에서 Other> Mass Maintenance 를 선택한다.
    2. Move/Merge 작업을 위한 Request Name 과 Description을 입력한다.
    3. Request Type 으로 Move 혹은 Merge 를 선택한다.
    4. source-to-target account 를 위해 line number 를 입력한다.
    5. LOV 에서 source Account 를 선택하여 입력한다.
    모든 Account 는 enable 상태여야 한다.
    6. target account 역시 LOV에서 선택하여 입력한다.
    7. 지정한 작업을 수행 하기 전에 먼저 확인 작업을 할 수도 있다.
    8. 작업한 내용을 저장한다.
    9. Move/Merge request 를 수행한다.
    Example
    N/A
    Reference Documents
    Note. 146050.1 - How to Transfer Historical Data from One Account to Another

    Follow the directions here:
    http://support.apple.com/kb/HT2109

  • Copying save data from a PS3 to another PS3?

    Hi, Is there a way to copy/transfer a save data from one PS3 to another, without using PS+ cloud save?
    Please reply ASAP.

    I am using version 8.2, and it doesn´t allow me to sabe in 7.1
    So, I send you the screen shot of blocks diagram.
    Thank you in advance.
    Attachments:
    screenshot.PNG ‏36 KB

Maybe you are looking for

  • Call initiation/reception from OS X failure

    I have a case open with Apple about this but I'm wondering if anyone has seen situations where calls can't be made or received from Yosemite albeit with the right configuration on for FaceTime? Devices/setup: Mac Mini, OS X 10.10.2 iPhone 5S, IOS 8.1

  • Will an iPad mini send to a data projector?

    If I buy an iPad mini, will I be able run a PowerPoint presentation and send it to a data projector? Thanks, Peter

  • MRP II in Production Planning and Control

    Dear all,     I am studing SAP Production planning and control. What is Manufacturing Resource Planning (MRP II) and  what is the role of MRP II in PPC? What all modules MRP II covers in ERP? Thanks in advance Jenisha

  • CS5 contact sheet search?

    Can anyone tell me what happened to the contact sheet in cs5?  Any suggestions for a workaround if its been removed?

  • Inspection lot creation not required for intercompany Stock transfer order

    Hi Team, The client  does not want system to create inspection lots for inter comapny STO. But for intra STO system does not create the inspection lot and thye are happy with it. I have have flagged the indicator "QM not active' for the movement type