Regarding good practice

Hi,
Can somebody let me know whether it is a good practice to have two declare section in same procedure in pl/sql programming. Is there any draw back for same?
Regards,
basil Abraham.

user575682 wrote:
Can somebody let me know whether it is a good practice to have two declare section in same procedure in pl/sql programming. Is there any draw back for same? It is good practice not to have declare sections at all - as PL/SQL code is best done inside the Oracle database as stored packages and procedure and functions. This does not require a declare section at all - unless when dealing with the exception of dynamic PL code. (an exception that requires very sound technical reasoning)
For the external applications making PL/SQL calls using anonymous PL/SQL code blocks, these may use declare sections.. but usually not. Why?
Declarations are typical for variables to be used in the anonymous block. As bind variables should be used by the application, there is very seldom the need to make use of a declare section.
So the declare section is not something that you should often see and use in production PL/SQL code. Both in stored code in the database, and in anonymous block code in external applications.
Mostly the declare section is found in code (anonymous PL/SQL blocks) used for purposes like testing. (e.g. typically adhoc code and not formal production code)

Similar Messages

  • Is VHDX for data drive considered good practice on a client PC?

    Hi!
    I don't like putting user's data files (documents, etc.) inside the user's Documents directory on C:. Instead I prefer having them on a D: disk, separate from the OS. On the other hand I don't want to create a fixed size partition as I consider it a waste
    of space, especially when everything is on a rather small SSD.
    Therefore, I consider creating a virtual hard disk (VHDX) on my C: drive and making it dynamically expanding. This would allow me to store data on that "separate" disk which is actually an expanding VHDX file on C:. One problem is that for some
    unknown reason Windows 8.1 is not able to auto-attach such disks on startup, but I have seen some workarounds to auto-mount them through tasks.
    My question is the following: Is it considered good practice to put all data files on such a dynamic VHDX instead on a separate partition? Reading the VHDX explanations it looks like this file format is very stable (even in case of power loss) and is widely
    used in virtual servers. Performance should be also very good. Therefore I don't see any reason to not use it for my data drive. Or are there any drawbacks?
    Thanks in advance for any help.
    Best regards,
    Anguel

    Hi,
    Since the VHDX is created on C which should be the system partition, I don’t think it is more safety than separate partition.
    Please consider that once the system corrupted and we have to format the C to reinstall the System, it may be difficult for us to recovery the date. But the separated partition will be easily stayed without changes.
    You can try to shrink the C volume in Disk management to create a new partition.
    Just my thought.  
    Kate Li
    TechNet Community Support

  • What is good practice for playing multiple video's in a single swf?

    Hello,
    I have build in the past a video wall with video's inside. After building this i came across some problems.
    If you have too many video players loading at once it takes a lot of processing and the tweens in the
    page while loading the video's where not moving fluidly, but more in a stuttering way.
    After lot's of test i found a good working solution.  I imported the flv video's into flash en exported them on the timeline
    as a embedded swf.  Then i externally loaded these swf files and that performed much better.
    Is it even good practice to load multiple video instances at once? I used this time the LoaderMax of greensock but the video's
    only play after it's completely loaded. I would like to find a way to progressive play all video's at.
    Does someone has experience with this?
    Regards,
    Chris.

    How about an XML file which supplies the title for each movie and the location or source of the video to be played?  Simple version below.
    <?xml version="1.0" ?>
    - <playlist>
    <video src="Gfx/video/Alex1.f4v" title="John Deere 330" />
    <video src="Gfx/video/Benni1.f4v" title="Hitachi Z240F" />
    <video src="Gfx/video/Scotti1.f4v" title="Hitachi Z350F" />
    <video src="Gfx/video/Scotti2.f4v" title="Hitachi Z350F" />
    </playlist>
    JR

  • Good Practice for managing player high scores & other stats

    During PC based game development, what is a good practice for saving high scores, game history etc for multiple users in terms of the following attributes :
    file types, data types to be used in the file, file protection from manual editing etc.
    pls throw some advice on the popular industry practice in use.
    regards, bittu ch

    During PC based game development, what is a good practice for saving high scores, game history etc for multiple users in terms of the following attributes :
    file types, data types to be used in the file, file protection from manual editing etc.
    pls throw some advice on the popular industry practice in use.
    regards, bittu ch

  • Is it the good practice?

    Hi,
    With OIM 11g, I try to implement different UI requests for user creation.
    A request for external users and a request for internal users.
    For both of them, UI displays only :
    -Last name
    -First name
    -Birth Date
    For external user request, email is generated by firstname an lastname and prefixed by external.
    For internal user request, email is generated by firstname an lastname and not prefixed.
    To do that, I would like to use the request API "Platform.getService(RequestService.class)" in an event handler to get the request template name and generate the mail according to the template name.
    Can I get the request id in the event handler?
    Is it the good practice?
    Regards,
    Pierre.

    user1214565 wrote:
    thank you very much bbagaria,
    Can I use different datasets for user creation, one for external user, one for internal (I thought I could only modify and use the default dataset: /metadata/iam-features-requestactions/model-data/CreateUserDataSet.xml for all creation request)?
    If yes, how? (I tried to import MyCreateInternalUserDataSet.xml but it didn't work)
    With the default dataset, I expected to create two request templates, one for internal and one for external and get the template name in the a preprocess event handler.
    Regards,
    PierrePierre,
    I would suggest that you just modify the CreateUserDataSet.xml (not rename but import it back at same location in MDS [over-write]) to add additional field for type of user (hidden if you want) and use prepopulate with the type of user internal or external based on the template selection. The prepopulate adapter takes in RequestData object and that has getRequestTemplateName() method. Or just populate the email based on the template selection.
    I haven't tried this but theoretically it seems that you can user this.
    http://download.oracle.com/docs/cd/E17904_01/apirefs.1111/e17334/oracle/iam/request/vo/RequestData.html#getRequestTemplateName__
    HTH,
    BB

  • Good practices for ECC 6.0 wr.t. internal tables..

    hi,
    i am told that when defining internal tables in ecc 6.0, we shud avoid using OCCURS and WITH HEADER LINE.  and always use work areas..
    is this right ? is this a good practice or a must ?
    i followed this and created an internal table without a header line .then i  am using a collect statement in my programn which fails and says that IT is not with header line !!
    COLLECT ITT.
    what to do ?
    thks

    Yes, that is correct.  SAP is pushing the use of ABAP Objects and you can not use OCCURS or HEADER LINEs in the ABAP OO context.  You should always defined explicitly and a work area.
    Data: itab type table of mara.
    Data: wa like line of itab.
    So then you must keep this in mind when doing any operations on internal tables, like in the case of the COLLECT statement, the syntax would be.
    wa-field1 = '1'.
    wa-field2 = '2'.
    Collect wa into itab.
    Regards,
    Rich Heilman

  • Is a good practice store pages into ECM ?

    Hello there.
    My team is building a portal that will be composed by a template/skin and some static pages. We think to put this pages into ECM, there is a good practice? How could i internacionalizate ?
    Thanks you.

    Why you need to store html pages in ECM ?Is it really required?
    If not then why you use mutiple time ucm calls to fetch html pages.
    Best practice to store static contents in PortalAssets projects.As per the documentation -
    http://docs.oracle.com/cd/E23549_01/webcenter.1111/e10273/createapp.htm
    PortalWebAssets is also a project. PortalWebAssets are intended to include static resources, like HTML and image files, in a newly created portal web assets project.
    Here is the link on how to build multilingual webcenter portals-
    http://docs.oracle.com/cd/E25054_01/webcenter.1111/e10148/jpsdg_languages.htm#CJAIIAJF
    Apart from your query on internationalization of webcenter ,what kind of objectives you have.
    you can manage simply by calling JSTL with EL and UCM mix to achieve it.But again it is simple form.
    <c:if test=${view.locale=='en'}>
    call ucm english content
    </c:if>
    <c:if test=${view.locale=='ar'}>
    call ucm arabic content
    </c:if>
    Hope it helps you,
    Regards,
    Hoque

  • Is it good practice to define text elements in User exits & there by using?

    Hi Experts,
    Simple doubt that, am wrting code in a User Exit. So, here my code works only, if the DOC TYPE = 'XXX'.
    So, instead of using hard coding as 'XXX', I wuld like to use a text element, like
    if DOC TYPE = text-xxx.
    my logic.
    endif.
    and creating the same text element.
    so, let me know that,
    Is it safe/recommended to use text-element in exits?
    Is it good practice to define text elements in User exits?
    thanq

    u can also use SET ID's if u dont want to hardcode like that in ur program.
    if u use SET ids , no need of transport request in case of change in the DOC types , directly u can change values in that set it , its like a master id.
    sytax will be like this
    doc_type in g_doc_type(this is set id ).
    for creation of set ids see tcode GS01.
    regards
    Prabhu

  • WHAT IS SAP  " GOOD PRACTICE" FOR TESTING PROCEDURES ?

    Dear Gurus, could you please share with me the good practice of testing procedures? I am a 1st level fico support and being asked for this. Thanks in advance for your kindest help.

    Hi,
    Please use the below links FYR...
    http://help.sap.com/erp2005_ehp_02/helpdata/en/2f/75ba3bd14a6a6ae10000000a114084/content.htm
    http://www.ebooksquad.com/search/SAPmoduletesting+procedures
    With Regards,
    Lolla.

  • Admin/limited user good practice

    Hello, I wonder if there are any good practice pointers regarding Admin/User accounts.
    Should one, for example, install stuff from an admin ID and use from a limited user login?

    Malcolm Rayfield is on the ball. I would add that you should set up a spare admin user and check 'he' works from time to time but otherwise leave him alone.
    If anyone suggests that is unneeded search through these forums to see the number of times people post about defective admins and a consequent loss of ability to fix it. Especially look at the lenghts you would need to go in the advice given by Netinfo experts here. E.G Go into single user/ complex serial terminal commands to modify Netinfo. I would prefer to avoid that.

  • What is a good practice to handle LOV in jdev apps?

    Hi, experts,
    In jdev 11.1.2.3,
    In our projects, there are many LOVs which the value are stored in a common dictionary table, for example in table refcode:
    refcode(id, low_value,high_value,meaning,domain_no),
    Different LOVs will retrieve value pairs(low_value,meaning) , or (high_value,meaning) from refcode table by using domain_no as the filtering criteria.
    In the end user's UI, the code/number field values should be displayed by a meaning word from refcode,
    To accomplish this goal, I will create numberous associations between different tables with refcode,
    and create VOs to have refcode entity view as a secondary entity view.
    I feel some odd in doing so(because so many associations with the same refcode table),
    Is that a good practice to handle LOV this way ?
    Thanks.

    On Fusion Developer's Guide for Oracle Application Development Framework
    10.3 Defining a Base View Object for Use with Lookup Tables
    (http://docs.oracle.com/cd/E37975_01/web.111240/e16182/bclookups.htm#BABIBHIJ)
    10.3.3 How to Define the WHERE Clause of the Lookup View Object Using View Criteria
    There are valuable information and suggestions on implement lookup features, especially by using view criteria
    (the View Criteria and View accessor is one of important and great idea in ADF)
    I think, by using of view criteria, the derivative attribute to display fk information can be implemented in a convinent way without FK associations definition.

  • JTable: RFC on good practice (SQL queries from cell editor)

    I usually add/remove/edit JTable data from an external panel. But in this scenario, my client would like to be able to click on the first column of an empty row and enter a product number. Within the cell editor, I must make an SQL query to the database in order to determine if the product number is valid and if so, use part of the SQL data to populate other cells of the current row (like product description).
    My problem is that this just doesn't seem right! Isn't the cell editor executed on the only Swing thread? Also, if the product number is not valid, I correctly implement the stopCellEditing() method but for some reason, you can still navigate the table (click on any other cell or press the TAB key, etc)... weird!!
    Does anyone have a good practice on how to perform the SQL query in a better place and force a cell to be selected until you enter a valid number or press the CANCEL key?
    I was looking at implementing the TableModelListener's tableChanged(...) method but I'm not sure if that would be a better place either.
    I personally would edit outside of the table, but good practice seems hard when the requirement is to edit from a cell editor!!
    Any suggestion would be greatly appreciated!
    Thanks!

    maybe you could write an input verifier for the column that does the query and rejects invalid entries.
    maybe you could send the query off in a worker thread.
    as far as making the table so you can't select any cells, hmm. not sure.
    you could disable
    .setEnabled(false);the table until the query comes back, something like that.

  • Quick question regarding best practice and dedicating NIC's for traffic seperation.

    Hi all,
    I have a quick question regarding best practice and dedicating NIC's for traffic seperation for FT, NFS, ISCSI, VM traffic etc.  I get that its best practice to try and separate traffic where you can and especially for things like FT however I just wondered if there was a preferred method to achieving this.  What I mean is ...
    -     Is it OK to have everything on one switch but set each respective portgroup to having a primary and failover NIC i.e FT, ISCSI and all the others failover (this would sort of give you a backup in situations where you have limited physical NICs.
    -    Or should I always aim to separate things entirely with their own respective NICs and their own respective switches?
    During the VCAP exam for example (not knowing in advance how many physical NIC's will be available to me) how would I know which stuff I should segregate on its own separate switch?  Is there some sort of ranking order of priority /importance?  FT for example I would rather not stick on its own dedicated switch if I could only afford to give it a single NICs since this to me seems like a failover risk.

    I know the answer to this probably depends on however many physical NICs you have at your disposal however I wondered if there are any golden 100% rules for example FT must absolutely be on its own switch with its own NICs even at the expence of reduced resiliency should the absolute worst happen?  Obviously I know its also best practice to seperate NICs by vender and hosts by chassis and switch etc 

  • Is that a good practice to use syncronize methods for application scope cls

    Is that a good practice to use synchronize method in a application scope class, so I have a doubt, there a is class A, it has application scope and it contains a synchronized method add, so because of some network traffic or any unexpected exception client1 got stuck in the method, will that add method available for any other client...?
    Edited by: navaneeth.j on Dec 17, 2009 4:02 AM
    Edited by: navaneeth.j on Dec 17, 2009 4:04 AM

    If it needs synchronization, then it probably doesn't belong in the application scope. Either keep it as is, or reconsider the scope, or make it static.

  • Overloaded methods-yes or no & is this a good practice

    say i have two methods with the same name that take in the same parameters and have the same return type. the difference between the two is that one is static while the other is not. Also the methods contain different codes.
    are the methods going to function normally when i use em? also if they do function normally, is this essentially a good practice?
    if code is needed to answer this, please do mention it and i will think of a mini scenario where this can be applied and write a small piece of code for that.
    thanx. help will be appreciated.

    avi.cool wrote:
    duffymo wrote:
    each account has its own password that the user sets when the account is created-this password is declared as a state variable in the class file. One password per account? A bad model, IMO. My on-line banking software associates credentials with me, not my accounts. I see several accounts when I log in, and I don't have to log in individually for each one.
    besides that, theres also a bank password-this is declared and initialized as a static state variable in the class file. some of the operations require the bank password for access while others require account password.Static bank password? I'm very glad this is a throw-away student exercise, because you have no idea what you're doing.hahaaa, tru tru, its for a skool assignment for my first ever programming course. though not a throw away, i putting a lot of work into this :-) i m not actually trying to resolve any security issues here or strengthen account security. basically, I am only trying to exhibit a tiny bit of creativity while showing understanding of course contents. so nothing to stress on :-D i know not very creative but its all i got at this stage.
    i was trying to exhibit the use of overloaded methods in my program by having method to check the password that the user enters to access operations.
    now the ones that require account password, i was thinking of having the password check method as a non-static method since its associated with the object.
    while the ones that need bank password, i wanted to have as static method.
    i wanted both methods to have the same name.You've no idea what you're doing.
    how i solved it,
    i decided on having both methods as static methods. the one that checks account password, takes in two parameters, the account name(object name) and the string to be checkd. the one that checks bank password, takes in only one parameter- the string to be checked.Wrong.i would be really thankful if you could help me rectify my mistake and advice on how i should be doing this. is there a conceptual error? i am a bit confused now.
    Its exactly what I told you.. but now, you just have to come on here and post this :p
    and isn't this sort of like cheating? :P I mean this IS our exam you know... You're basically asking other for the arithmetic and logic lol.

Maybe you are looking for

  • MacBook Pro retina: Mid-range 13" or low-range 15"?

    Hi, I'm a second-year university student looking to get the latest MacBook Pro retina (switching from a PC). I have been to the store and tried both - I am very torn between getting a mid-range 13" (I want the 256GB SSD) or a low-range 15". With the

  • Blue Screen with installing new Windows on already pre-installed one

    Hello everyone, I am sorry if that topic has already been dealt with, and if I am asking about the same thing. I found a few posts relating to my problem, but it did not fully help, so... I bought a M70 in Germany, it has Win XP HE already installed,

  • Reg:pojo datacontrol not functioning wehn exposed as proxy for webservice.

    Hi , I have a class which sets the request and header part and for this data control is created and hence works fine when worked by dragging to page. Sample : Class1{ function setheader (){  ....  } function setrequest() { .... } function invokeservi

  • JSP problem when running Tomcat in Eclipse

    Hello, Eclipse newbie here. I just started using Eclipse and I have installed the Tomcat plugin. When I run Tomcat within Eclipse, http://localhost:8080 works fine, but when I tried to access a JSP that I've created, I'm getting this error: HTTP Stat

  • Oracle WebCenter Interaction 10.3.0 Installation and start up error

    Hi, I am trying to install the Java version of Oracle WCI 10.3.0 on Windows 7. I know Windows 7 of not officially supported. I was able to successfully install on Windows XP using the installation wizard. However, for Windows 7 - I can't use installa