How can I include a link to the remote database as a variable in pl/sql?

I am writing a new procedure for the parcel and it can be run on different environments. Excerpts from the main query in a table via a database link. I created variables to identify the owner of the current scheme, the owner of the remote table and the database link remote. The problem I have is to put this together in the main query for example.

PROCEDURE check_table
AS

v_schema_owner varchar2 (30);
v_database_link_owner varchar2 (30);
v_database_link_value varchar2 (128);
v_table varchar2 (500);


BEGIN

-Download the current schema owner-
V_schema_owner INTO SELECT username
Of user_users;

-The owner of the link database download-
Master_owner SELECT INTO v_database_link_owner
OF dba_mview_refresh_times
WHERE name = 'TEST_MV '.
AND the owner = v_schema_owner;

-Download database - link chain
Substr(master_link,2) SELECT INTO v_database_link_value
OF dba_mviews
WHERE mview_name = 'TEST_MV. '
AND the owner = v_schema_owner;

v_table: = v_database_link_owner |'. ' |' test_table@'|| v_database_link_value;


INSERT INTO check_table
SELECT trunc (sysdate) as check_date, 'Error of Test' as check_reason
OF v_table-* this is where he fails to compile * -.
WHERE texte_erreur like '% Test Failed ";

COMMIT;

EXCEPTION
WHEN NO_DATA_FOUND
THEN
NULL;

END check_table;


I get "table or view does not exist" on v_table. I tried to not have a variable v_table and set the string for the name of the table directly in the query, but it does not work. Only when I hardcode the owner of the table and the link doesn't it works but ideally I'd rather not have to do that.

Does anyone have any suggestions?

Thank you
GB

>
INSERT INTO check_table
SELECT trunc (sysdate) as check_date, 'Error of Test' as check_reason
OF v_table-* this is where he fails to compile *.
WHERE texte_erreur like '% Test Failed ";
>

Hi, you use an EXECUTE IMMEDIATE to execute dynamic sql code

vSql := 'INSERT INTO check_table' ||
                ' SELECT TRUNC(sysdate) as check_date, ''Test Error'' as check_reason'||
                   ' FROM '||v_table||
                      ' WHERE error_text like ''Test Failed%''';
EXECUTE IMMEDIATE vSql;

Check this too
http://download.Oracle.com/docs/CD/B19306_01/AppDev.102/b14261/dynamic.htm#i14500
http://download.Oracle.com/docs/CD/B19306_01/AppDev.102/b14261/dynamic.htm#CHDGJEGD

Concerning
johnxjean

Tags: Database

Similar Questions

  • How can I add a link using the adobe reader software?

    How can I add a link using the adobe reader software?

    Hi johnny05,

    This isn't something you can do with Adobe Reader. To edit a PDF file, including adding a link, you must use Acrobat. We invite you to try Acrobat DC for 30 days; You can download a trial of this page: Download Adobe Acrobat free trial version | Acrobat Pro DC.

    Best,

    Sara

  • How can I include my printer in the "homegroup"?

    How can I include my printer in the "homegroup". I had a popup come on the screen indicating that all network devices should I include in my home group. I was offered the possibility to print msge but it wouldn't print. It offered no guidance on how to accomplish said feat. It prints fine w/usb cord but not network print.

    Hi Gerald,

    Thanks for posting your query in Microsoft Community.

    There could be several reasons for this cause. We will try these steps and check.

    Step 1:

    http://Windows.Microsoft.com/en-us/Windows7/share-a-printer

    http://Windows.Microsoft.com/en-us/Windows7/access-files-and-printers-on-other-HomeGroup-computers

    http://Windows.Microsoft.com/en-us/Windows7/file-and-printer-sharing-frequently-asked-questions

    Step 2:

    Find and install printer drivers
    http://Windows.Microsoft.com/en-us/Windows7/find-and-install-printer-drivers

    Step 3: Manually add the printer to the local port.

    a. go to control panel and click on devices and printers.
    b. click Add a printer, and then select Add a local printer. Click on create a new port. The default value in the drop-down list is Local Port. Don't change that.
    c. click Next.
    A dialog box appears for you request that you enter a port name. Type the name of \\computer name\printer.
    d. type your user name and the name of the printer (name \\PC\printer)
    e. click ok and exit.

    Update the drivers for your printer.

    Updated a hardware driver that is not working properly:
    http://Windows.Microsoft.com/en-us/Windows7/update-a-driver-for-hardware-that-isn ' t-work correctly

    If the problem persists, then manually add the printer to the local port.

    Hope this information is useful. Please feel free to answer in the case where you are facing in the future other problems with Windows.

  • How can I remove a link in the links Panel?

    I moved an item out of the folder of links on a project that I train in IDCC and opening of the project he said, rightly, that a link is missing. When I go in the links Panel, I see the alert that the bound element is missing, that I know, and I want to remove the link in the links Panel, but do not see any option to do this, also the delete key does nothing when the item is highlighted and do a right-click (^ click) don't offer no delete choice either. How can I remove this item in the links Panel?

    TIA,

    Ken

    You must remove it from the page of the document where it was placed.

  • How can I make my link 'See the product detail' of .swf in Dreamweaver

    Hi all:

    New to Dreamweaver.  This should be a simple click, but I can't.

    I made a button to 'See the product detail'.swf into Flash and I imported into

    product my Web page in Dreamweaver.

    How can I make a link to another page where the larger picture of the product is in Dreamweaver? /

    Thank you

    Ms. frustrated

    I made a button to 'See the product detail'.swf into Flash and I imported into

    product my Web page in Dreamweaver.

    I'm sorry to say, but I think it is a very bad idea.  Flash navigation elements are not good practices on the web, because you cannot be 100% sure that your visitor has the Flash Player on your computer.  In addition, the search engines don't analyze reliable these links for SERP purposes on the page.  Finally, any person using an assistive device to the screen will not be able to use these items.  Using a graph prepared in FW or PS, however, will not have these disadvantages and will be 100% reliable/useable for all categories (assuming that you have correctly provided a descriptive alt attribute for the image).

    How can I make a link to another page where the larger picture of the product is in Dreamweaver? /

    You can't do that in HTML - it needs to be done in the Actionscript of Flash at the moment you make the button. It is yet another reason why use Flash navigation items is a bad idea...

  • How can I create a link or the words in my web page to open an external file?

    I have a text on a page, how to render a word in the text (hyperlink) to open an external file. When users would be 'mouse' on the word and know that it is a hyperlink because the word likely to change color or become fat for example. Thanks for your thoughts.

    1. open the menu "File/add files for download" and choose your file.

    2. Select the word that you want to have a link.

    3. go in 'Links' in the strip of higher command and assign the file you have selected for download.

    4 loan

  • How can I include multiple pages for the default homepage on statup

    When I launch Firefox, I want to show several tabs with a few of my favorite sites. Is it possible that it could be in IE?

    See

    The easiest way is to have exactly the pages you like your home page as the only pages open in the window, and then set your homepage

    • Tools > Options > general >...
    When Firefox Stats: view my homepage
    Click on "use current page (s) '
  • How to use refcursor type returned from the remote database in the local database

    Can anyone say is how they use the refcursor use type returned from remote database in the local database using dblinks.

    See MOS ID 750126.1 doc ORA-24338 when trying to return a Refcursor over a database link.

  • How can I include street address in the address book list?

    I have street address in the properties. But I can't tell how to include in the address book list.

    The list is limited and that you have observed physical address is not among the options in the list.

  • How can I put a link in the flash animation simple adobe?

    I have simple web header animation, wanted to put a link. I tried putting a button and put a simple link, but this script did not work.

    The code must be in the timeline in the same frame as the button target.

    The "_blank" should have quotes around it and should not be attributed to target.  The line should simply be...

    getURL ("http://www.iraepstein.com", "_blank");

    The button must be a movieclip or button symbol and should have its instance name "b3" assigned in the properties panel, where it says "".

    If the button exists in fairer thasn the last image, then there should be this assinged to name to each keyframe in the timeline.

  • How can I include results of a subsequence, which takes place in a new thread in the test report from the main sequence

    Hello!

    I have ", working with the Version 4.2.1 of TestStand. I have a main sequence, which sous-séquences of different calkls. All these steps are reported correctly. One of the subsequences works like "new thread". How can I include his results in the common test report of the main sequence?

    I have variable markes of the subsequence as is required for the test report (it works OK if it's not a new thread). If the digital test, which is performed in this subsequence is correct, I get no results at all. If the digital test could not get a "message in red" who whithout having failed to test any reference to step somewhere in the report of the main sequence or values of vaiables that were not correct.

    I tried an option 'on the fly' in the Configuration of the report, but n ' got no useful result. What should I do?

    Best regards

    Hello Pericles,

    You can use a queue time for the results of the wire once it ends. Place a waiting time after the call to the thread in your MainSequence at the location where you want the results to add to the report (compared to other results). In the waiting step Setup tab, select wait: Thread the threaded sequence, and then select call to specify sequence call the radio button. You can also use an object reference if you need results if poster somewhere where elsewhere - you would just add an object reference to the appeal of sequence threaded in its thread settings dialog box.

    I hope this helps.

    -Jack

  • How can I include a search page on the web in an E-mail?

    I have a desktop HP TouchSmart 610-1147c. running Windows 7 64 bit.  I should answer that question years ago, but I did not... terrible huh?  Anyway, how can I include a page from a web search I did in an E-mail?  Believe it or not, I have never had to do before, so have no idea how to do that.  I have the feeling that he would be sent as an attachment, but how do not know how to do!

    I'd appreciate any help that someone took the time to give me.  Thank you in advance for having patience with me and my silly question.

    My aunt CC

    Well, the way I would do is copy and paste the URL in the e-mail so that the recipient can click the link and get the right of the Web page.

    For example, I just googled 'horses' and there is the result of this research:

    http://www.Google.com/#hl=en&output=search&sclient=psy-AB&q=horses&OQ=horses&AQ=f&AQI=G4&aql=&gs_l=HP.12..0l4.1544.2886.0.7582.6.5.0.1.1.0.250.906.0j3j2.5.0...0.0.RC9-kyP6JM4&PBX=1&BAV=on.2,. or.r_gc.r_pw.r_qf, cf.osb & fp = 3f1469f1e9441b37 & biw = 1186 & bih = 549

    I've highlighted the Web address, copied and then pasted into the answer.  Same thing can be done in an emial.

    Who is?  Or you are looking for something else?

    GeorgeFN

  • I would like to bring to the text from Word (and the web) which is already a hypertext link in InDesign. How can I do it while keeping the links active?

    I would like to bring to the text from Word (and the web) which is already a hypertext link in InDesign. How can I do it while keeping the links active?

    Whenever I have to copy and paste from the web or Word it removes hyperlinks.  And when I try to do in 'Place' ing a Word document in my InDesign project that it retains formatting with it, the rectangles around the text.

    I have the latest version of InDesign.

    Any help is appreciated.

    Copy-paste might not include the shaped. A regular import using square is the best way.

    The rectangles around the hyperlinks are just to indicate that they are links - they do not print, but they appear in your PDF.

    You can delete them by double clicking on the hyperlink in the hyperlinks Panel and select "Rectangle Invisible" as the type.

    In general, Word formatting of hyperlinks - blue text, underline - with a character Style. If you want to remove or change the formatting, all you have to do is to change the character style. My experience, however, is that you need to check all the hyperlinks because no reason apparent, sometimes they appear in the document without the character style.

  • All the links on a page was taken over by ads. How can I stop and go to the linked site correct

    All the links on a page was taken over by ads. How can I stop and go to the linked site correct

    You may have ad / bad-ware. More information can be found in the article troubleshooting Firefox problems caused by malware .

    Run most or all of the listed malware scanners. Each works differently. If a single
    program forget something, someone else can pick it up.

    Adblock more {web link}
    Blocks annoying video ads on YouTube, Facebook ads, banners
    and much more. Adblock Plus blocks all the annoying ads, and
    supports Web sites by blocking is not discrete (configurable) default ads.

    Pop-up Addon Adblock more {web link}
    Adblock Plus pop-up Addon - extends the functionality of blocking of the
    Adblock Plus for those annoying windows pop up that opens on the mouse
    clicks and other actions of the user.

    Forum; Homepage of Adblock Plus {web link}

  • When I right click on a link 'Open link in a new tab"for a few days, he"jumps"tab to the right and opens in the tab beside it. How can I change this back to the opening in the tab next to the page, hence I open as it used to be?

    When I right click on a link 'Open link in a new tab"for a few days, he"jumps"tab to the right and opens in the tab beside it. How can I change this back to the opening in the tab next to the page, hence I open as it used to be?

    Just to add to the response of cor - el, in my case (identical) was specifically the complement DivX HiQ, worm 2.1.0.900. As soon as I turned it off, the tabs started to behave normally again.

Maybe you are looking for