PL/SQL and XML

So I have a little problem. I have a request that I need to have to produce XML from. I was initially doing this through htp.prn, but then I realized that some of the data that I was out to and XML file may have special characters in them, namely signs and double quotes. I decided to see if Oracle were all functions to remove special characters and replace them with the HTML counterparts (an ampersand would turn into & amp ;)) I found a few things that seemed useful, but the problem is, with the functions I found, he wanted the data to be strictly out of the database and some of the data I wanted in the XML document was also user entered on the pages. Is there something out there that will search by text AND query results to check that there are no special characters? Thank you.

-Joshua

The following function should work for what you are trying to do.

htp.p(htf.escape_sc(:P1_ITEM));

To escape the database columns simply include in your select statement:

SELECT htf.escape_sc(COLUMN_NAME) alias
  FROM TABLE

To escape from the elements on your page apex:

INSERT INTO table
           (COLUMN_NAME)
     VALUES(htf.escape_sc(:P1_ITEM))

Good luck

Tyson

Published by: Tyson Janet on November 25, 2008 16:12

Tags: Database

Similar Questions

  • SQL and XML Schema

    I hope this is the right forum to post. I was wondering if there is any good tutorials or books on SQL in XML format?
    Basically, I need to interrogate the accounts of North Carolina who received a document given in the past day. This is a very easy task to do, in SQL, however, the State of North Carolina wants us to share our findings in a specific XML schema using nodes.

    Fortunately, I have the pattern that was given by the State of NC but don't know how to get my application to fit in the XML schema. I was wondering in a beginners perspective.

    Sorry for the newbie questions.

    The [DB XML Forum | http://forums.oracle.com/forums/thread.jspa?threadID=410714&tstart=0] is a good starting point.

  • learning SQL and pssql, xml, forms and report

    I learned sql and plsql I donot Xml and forms and reports learn by own by easy method

    by sql and psql we learned basic on the rise, things of time ranging from online book (another way to practice and understand the concepts)

    repo, xml, sql, forms and pssql of learning javascript:; rt learning SQL and pssql, xml, forms and reportfor beginners

  • OBIEE-write delayed enactment of PL/SQL in XML

    Hi all
    Thank you very much D info was really helpful, but in my database, I need to take into account the exceptions so I was wondering if I could use PL/SQL with XML in the writeback... ??? If Possible can u give an example XML wid THAT PL/SQL for UPDATE/INSERT Write Back in OBIEE because we have few exceptions to be managed during writeback is made...
    I would really Appreicate it. Thanks in advance... For example... lke if something = 0 value is given to do the B value, which depends on A zero... otherwise it should work in normal proportion... for this I need to PL/SQL

    Concerning
    Jeffroy

    It seems to be a typo in your (missing) declaration; check using sqlplus and toad.
    BEGIN
    IF '13' > 10 THEN
    UPDATE DAILY.test_p SET A = ('13' + 5), B = '1 ', '13' + '1' = C, D = ' 13' + ' 1' + ' 13', E =('13'+'1'+'13') * 1' WHERE s_no = ' 1' *; *
    ELSE UPDATE SET DAILY.test_p = ('13' + 3), B = '1 ', '13' + '1' = C, D = ' 13' + ' 1' + ' 13', E =('13'+'1'+'13') * 1' WHERE s_no = ' 1' *; *

    END IF; END;

    Concerning

    John
    http://obiee101.blogspot.com/

  • Problem with WSUS after upgrade of SQL and SCCM

    A few years ago, we implemented SCCM 2012 R2 on a virtual machine running Server 2008 R2 (Enterprise), using 2012 SQL for databases.  We use it for software deployment, updates/patches via WSUS and imagery of the network.  Everything is smooth enough for most, even if we hit a few snags Windows 10 points when that came out.  After you install the patches and updates to our Server 2008 box to make it compatible with Windows 10 content, everything was good again.  A few weeks ago, I decided to update our version of SCCM 1511 and SQL for 2014.  After the two updates, I tested imaging and software deployment, and everything seemed good.  I forgot WSUS, however... and later visited account it was not working properly for these updates.  Unfortunately, I realized after I deleted the VM snapshot, I got to thinking that everything was good (stupid, I know).  After researching and discovering some of the errors were permissions associated with - why would have changed the permissions on folders of SQL and SCCM upgrade I have no idea - those who have since been smoothed.  Now, my mistakes seem to be related SQL more and I hit a dead end with research.  When I opened WSUS and go look at the clocks, he tries to load the history of synchronization, and after a few minutes-error with the following information:

    The WSUS administration console failed to connect to the WSUS server database.

    Verify that SQL server is running on the WSUS server. If the problem persists, try restarting SQL.

    System.Data.SqlClient.SqlException - Timeout expired.  The delay before the end of the operation or the server is not responding.

    WARNING: The join order has been applied because a local join hint is used.
    Source .Net SqlClient data provider
    Stack trace:

    to Microsoft.UpdateServices.Internal.BaseApi.SoapExceptionProcessor.DeserializeAndThrow (SoapException-soapException)

    at Microsoft.UpdateServices.Internal.DatabaseAccess.AdminDataAccessProxy.ExecuteSPGetSummariesPerUpdate (String computerTargetScopeXml, String preferredCulture, String updateScopeXml, ExtendedPublicationState publicationState)
    at Microsoft.UpdateServices.Internal.BaseApi.UpdateServer.GetSummariesPerUpdate (UpdateScope updatesToInclude, ComputerTargetScope computersToInclude)
    at Microsoft.UpdateServices.UI.AdminApiAccess.BulkUpdatePropertiesCache.GetUpdateSummaries (UpdateScope updateScope, ComputerTargetScope computerTargetScope)
    at Microsoft.UpdateServices.UI.AdminApiAccess.BulkUpdatePropertiesCache.GetAndCacheUpdates (ExtendedUpdateScope updateScope, ComputerTargetScope computerTargetScope)

    at Microsoft.UpdateServices.UI.SnapIn.Pages.UpdatesListPage.GetListRows)

    I found a few forums that suggest to uninstall WSUS and delete the database, and then reinstall WSUS.  Unfortunately, when I try install fails... giving only an error code and no other explanation of why.  The error is 0 x 80070643, which is supposed to be due to the current user not having the "sysadmin" in SQL.  However, I have tried with several accounts I checked to make you have the sysadmin role in SQL (and are also part of the Administrators group on the server itself)-always get the same error message.

    I would really like to try to find that rather than wasting his time with the construction of a new server and redo our whole SCCM environment... get the client reinstalled on all our machines to synchronize with a new server appears as a huge headache.  Is there anyone else out there who know what would cause this?  Any help would be greatly appreciated!

    Hello

    This community is for users.

    Post your question in the TechNet Server Forums, as your question kindly is beyond the scope of these Forums.

    http://social.technet.Microsoft.com/forums/WindowsServer/en-us/home?category=WindowsServer

    SQL Server TechNet forums.

    https://social.technet.Microsoft.com/forums/SQLServer/en-us/home?category=SQLServer

    See you soon.

  • Difference between standard edition SQL and SQL workgroup edition

    I'm buying the processor SQL License. I'm looking for the standard edition of SQL, but the SQL workgroup edition is less expensive. I wonder what the difference is in two versions

    Hi DBBurns,

    This document compares the editions of SQL and should answer your question. If you need help, your questions there will be better answered in the Forums of SQL.

  • SQL and BI

    Hello Experts;

    I used some tools like Microstrategy bi, however it is still not comparable to a coding in SQL, PL/SQL, which gives a lot of flexibility, transparency, etc. So, how is it I always get customers pushing to have all of the BI process done on BI tools. Why SQL and PL/SQL, not at the forefront instead. I know that the graphical side of things put it at a disadvantage, but beside that I'm still why a little distraught.

    SQL and PLSQL can scare companies, many see a black magic (which, in some respects, can be), and it is not something that many customers feel able to learn or even tend to. On the face of things, this may seem complicated and used wrongly, can cause MAJOR problems with buinesses (poor performance, use excessive resources that affect other sessions).  Many have invested time in getting to know point and click graphical tools that can get results without feeling lost and confused by SQL, they prefer.

    However, as you rightly remember, nothing can replace SQL or PL/SQL.

    I suppose that the element of fear is a bit like why a lot of people using MS Paint to edit an image, many feel uncomfortable with it, he can do the basics, but not much, and they'll settle for that, but you could do much more with Photoshop - it's simply too scary to learn properly for most of the people so that they avoid it - they stick to what is simple and familiar.

  • Master-detail functionality between the regions of PL/SQL and IR possible?

    4.2.1

    THM 2

    Hi all

    We have two regions in a page. The upper region is a region of PL/SQL that lists the 5 best wages by Dept. This was not done using traditional reports because management wanted a "dashboard" as the look and feel that is already existing and what is happening in that it is a pl/sql block that has the sliders and the necessary HTML, CSS in there.

    Below that is an IR when the user clicks on the dept of region of PL/SQL, it will refresh the IR below to display all employees in this Department

    Top of the page shows region of PL/SQL

    EMP name Dept wage

    Emp1 10 10000

    EMP2 10 950

    Emp3 20 800

    The Dept field is a hyperlink.

    When we click on Dept on this region of PL/SQL

    The lower IR should be updated (without submit page)

    Output

    Emp1 10 10000

    EMP2 10 950

    It is a kind of master-detail relationship between PL/SQL and Report (Detail) (Master) area Interactive

    We can hyperlink in the SQL in pl/sql area, but you wonder how trap line and pass the dept id to the IR and get this region to refresh account?

    All suggestions from the experts?

    Thank you

    Ryan

    It is a way to pass the info in connection

    Perform the dynamic Action of the link column report

    The dynamic action can submit the session state value, and then refresh the IR.

    On either by the way, you must create dynamic PL/SQL region to solve this problem, see this

    APEX reports: layout custom with a column named (model line)

  • PL/SQL and APEX_JSON

    Hello

    I'm doing some tests with PL/SQL and JSON, this test case is how do I map the JSON data to the tables in a relational model. For this test, I have a 3 line, what wise format json seems good. I would like to extrace dsipaly through the output of the server and data from it. No idea what the problem with this logic here?

    DECLARE

    j apex_json.t_values;

    l_paths apex_t_varchar2;

    BEGIN

    apex_json. Parse (j,

    "[{"jsonrpc":"2.0","weather": [{'event': {'id': '27576810', 'name': 'London', 'postal code':"GB","time zone":" Europe/London', 'status': "Sunny", "openDate": "2015-10 - 22 T 16: 25:00.000Z"}, 'Count': 24},]}]. "

    {'event': {'id': '27576811', 'name': "York", "PostalCode": "GB", "time zone": "Europe/London', 'status': 'Cloudy',' openDate": "2015-10 - 22 T 13: 00:00.000Z"}, 'Count': 18},

    ([{[{'event': {'id': '27575114', 'name': 'Liverpool', 'postal code': "GB", "time zone": "Europe/London',"openDate":" 2015-10 - 25 T 15: 30:00.000Z "" "}, 'Count': 1}], 'id': 1}]');

    If apex_json.does_exist (p_path = > 'time', p_values = > j) then

    dbms_output.put_line (apex_json.get_varchar2 (p_values = > j, p_path = > 'event.id'));

    dbms_output.put_line (apex_json.get_varchar2 (p_values = > j, p_path = > 'event.name'));

    dbms_output.put_line (apex_json.get_varchar2 (p_values = > j, p_path = > 'event.countryCode'));

    dbms_output.put_line (apex_json.get_varchar2 (p_values = > j, p_path = > 'event.timezone'));

    dbms_output.put_line (apex_json.get_varchar2 (p_values = > j, p_path = > 'event.status'));

    dbms_output.put_line (apex_json.get_varchar2 (p_values = > j, p_path = > 'event.openDate'));

    dbms_output.put_line (apex_json.get_number (p_values = > j, p_path = > 'Count'));

    dbms_output.put_line ('Am in ');

    end if;

    l_paths: = apex_json.find_paths_like)

    p_values = >, p_return_path = > 'event [%] '.

    );

    because me in 1... loop l_paths. Count

    dbms_output.put_line (' no. Looping :'|| i);

    dbms_output.put_line (apex_json.get_varchar2 (p_values = > j, p_path = > l_paths (i): '.)) ID'));

    dbms_output.put_line (apex_json.get_varchar2 (p_values = > j, p_path = > l_paths (i) |'. name '));

    end loop;

    END;

    Hi 1247164,

    1247164 wrote:

    Please change your login username of "1247164" to something meaningful. Reference: Video tutorial how to change username available

    I'm doing some tests with PL/SQL and JSON, this test case is how do I map the JSON data to the tables in a relational model. For this test, I have a 3 line, what wise format json seems good. I would like to extrace dsipaly through the output of the server and data from it. No idea what the problem with this logic here?

    See the code examples given here: Re: Re: Re: access to the Web Service API

    Kind regards

    Kiran

  • I want to improve my skills in sql and plsql

    Hello friends,

    I finished the course SQL and PLSQL a few weeks back. Since then I've been hunting for a relevant work for SQL / PLSQL developer.

    However I really want to improve my writing of the subprogrammes, build effective SQL queries to become a skilled oracle developer.

    My current work is not linked to this use so all my free time to improve my knowledge in this area.

    I know the basics of SQL and PLSQL concepts and can write queries simple, subprogrammes, but to become employable, according to me, that I need to learn a lot more.

    Please suggest me some good sources be it no books / sites Web, etc. anything that would really help me become a good developer.

    I'm desperate to make a career out of Oracle SQL / PLSQL!

    Thanks in advance.

    Do what most of the experts do... start at the bottom.

    Find a job in a junior role (and yes it will be low wages initially) where the company may see your potential and enthusiasm to learn and will give training and let you learn on the job.  If you have the skills to do it, then you will learn quickly and prove you are competent and deserve to be promoted to better roles.

    When I started (in the same after having a university degree in it), I always had to start at the bottom, in a junior role, on a 3 month temporary contract.  Who got so extended that they identified some new work roles that were needed, and then I had to get one of these new jobs, where I got a permanent role.  Within 18 months, they had sent me on the training, and I was promoted to a role of DBA/programmer, working alongside other programmers and hardware team to manage database servers... everything just because I had shown the ability, willingness to learn and the professional approach to my work.

    Don't think you can just get some training or the qualities of the review, but have no experience and just get into some senior roles or an expert, as most of the companies are wise to such things... they want to know what you have for the roles of the experience.

  • Recent activity of SQL and PL/SQL space

    SQL and PL/SQL used to have sections of recent content and recent activity. However, given that the last mess has been set, the recent activity section is gone.

    Is it possible it could be brought back, please?

    No problem. I added it to the bottom.

  • Catproc.SQL and Catalog.sql run by mistake in the production database while the database is running.

    Hello

    DB version: 10.2.0.4.0 cluster db. EA

    Version of the OS: Win server 2008

    by mistake one of our dba ran CATPROC.sql and CATALOG.sql scripts in our live production rac database.

    After that issues rose and developers face invalid objects. We erased our users manually main invalid objects and it looks like everything is working well for the moment.

    BUT when I checked object invalid status, he showed me some 600 disabled objects. I'm afraid in the future will come from unacceptable errors.

    What should do? any suggestions? are we in danger? What are workarounds.

    Thank you

    You must connect a SR with Oracle's Support.

    Hemant K Collette

  • EUL5. SQL and other administrative issues

    I am responsible for creating reports for an application based on Oracle.

    As part of the purchase, the supplier of the application supplied discoverer.  The seller installed discoverer.  The provider support is not very well on their own request, so I don't even try to get help from their share of issues of discoverer.

    Some of the users of the application build reports using discoverer; I, personally, hate it.

    I am, by nature of my post, considered the Discoverer administrator, however.  I don't know anything about the software, but have recently found how I can get the end-user reports shared for me (for purposes of, then, sharing to others) through SQL (I know, I know - is not supposed to do it this way - but to get my end users to track the requests on the part is like pulling teeth).

    In read so, however, it became clear that I had no EUL functions installed for END user license holder.

    I tried to run eul5.sql, and I get "insufficient permissions", if!

    What owner eul permission would be missing, and how I give you that?  (I have access level of the Oracle database sys taking the NLY).

    Thank you!

    Start with the following privs to the eul_owner:

    CREATE SESSION

    CREATE TABLE

    CREATE VIEW

    CREATE SEQUENCES

    CREATE PROCEDURE

    CREATE SESSION

    CREATING USER

    GRANT A PRIVILEGE

    ALTER USER

  • Accept the user SQL and run batch

    Hi all

    I want to invite the user to enter their SQL and run it during the execution of a batch file.

    Results (after the running .bat file):

    Press any key to enter your sql

    -will be here sql user input

    You SQL statement has been executed successfully.

    Try:

    SET /P DB = [promptDBname]

    SET /P USER = [promptuserName]

    SET /P PWD = [promptPass]

    SET /P sqlText = [promptSQL]

    sqlText %Echo% > script.sql

    sqlplus %USER%/%PWD%@%DB% @script.sql

    Perversion!

    ----

    Ramin Hashimzade

  • SQL, PL/SQL and Java can be executed in the database

    I read this statement in a book
    "SQL, PL/SQL and Java can executed in the database".
    What it means.
    It does not imply that we can write the java code in client tools such as sql developer?

    >
    I read this statement in a book
    "SQL, PL/SQL and Java can executed in the database".
    What it means.
    >
    This means that Oracle has a JVM that is built into the server. This JAVA virtual machine can be used to run any Java classes that you have loaded (using the loadjava utility).

    Alternatively, you can write stored procedures that are executed in the same way as basic Java PL/SQL procedures.
    >
    It does not imply that we can write the java code in client tools such as sql developer?
    >
    It has nothing to do with where the java source code is written. The java source code or the code of the class file must be loaded in the database to be executed.

    The Oracle database is unable to interact with the Java code that runs outside the database as part of the same application.

Maybe you are looking for

  • Lenovo Energy Management

    I just bought 3 Y50-70 of lenovo laptops. I got them all configured and I installed the managemnt energy on them as they will be connected more often than otherwise. He succeeded on 2 of them but 3 when I click on settings and then try to click Mode

  • Pavillion15: cannot create recovery media when plug sandisk Flash Drive Cruzer 32 GB Force

    I put my new 32 gb sandisk Flash DRIVE on my pc and then followed the steps HP support assistant to create a recovery media. I get a message to say the minimum 22 GB capacity. He gets 90% and then comes up with a message saying that we live errors in

  • IE 8 and Windows Update

    I want to install IE 8. That is fine, but I have a few sites that do not work properly with IE 8 still. How can I stop Windows Update telling me that I have to update my computer and the only proposed update is IE 8. I uncheck the box next to IE 8 an

  • Access Manager in blocks of control too well how can I disable?

    blocks of too many sites just started this making how to change settings

  • How to remove 'Search' "Classic Start Menu" in XP?

    A solution was found after all these years? A suggested in MS #292504 "NoFind" solution is not an option because it disables the search function in the browser together. Thank you