What is the best place to store global constants?

Hello

I want to store some constants and access through procedures and functions, which would be the best place to do this? I thought that the chains of substitution might work, but it does not work for me in my procedures. Can we use the Substitution string in code compilation such as procedures and functions? I use SQL developer to write procedures.

See you soon

Hello

Table is good if 'permanent' could change so you can create the form of the APEX to maintain those.

You can also use package specifications just for constants for example

CREATE OR REPLACE
PACKAGE MY_GLOBALS
AS
  g_const_1 CONSTANT DATE := TRUNC(SYSDATE) + 365;
  g_const _2 CONSTANT VARCHAR2(30) := 'somestring';
END;

Then, you can see in the procedures, functions and processes APEX as (package_name.constant_name) MY_GLOBALS.g_const_1.

Kind regards

Jari

Tags: Database

Similar Questions

  • What is the best place to call the HomeScreen.setNewState method?

    Hello

    I have a requirement where I need to remove the 'Asterix' around my candidacy. So what is the best place to keep the code in HomeScreen.setNewState (false) which has been determined by an electronic mail message?

    THX

    Srinivas

    You want to delete when you know that your applicaitn has been invoked, so I consider this "reset" in the activate method (() of UiAppplication)

  • What is the best place in windows 7 to discover this netwerk is slow

    Hello

    What is the best place to find out if the netwerk is slow, which is sysmonitor?

    I find myself little complicated netwerk monitor utility.

    Thank you

    Johan

    You are welcome.

    Network Monitor 3.4 is a Protocol Analyzer. It allows you to capture network traffic and view and analyze.

    How to use Network Monitor to capture network traffic

    http://support.Microsoft.com/kb/812953/en-us

    http://TechNet.Microsoft.com/en-us/library/cc938655.aspx

    Working with Network Monitor part 1

    http://www.windowsnetworking.com/articles-tutorials/trouble/working-with-network-monitor-part1.html

    Resource monitor is used to display information about the use of hardware (CPU, memory, disk and network) and software (handles files and modules) resources in real time.

    Resource monitor strongly relies on event for Windows (ETW) tracking facilities, the installation of the counter program (event tracking session) used by the resource monitor can be used for the registration of institutions

    Using the resource monitor to troubleshoot Windows Performance part 1

    http://blogs.technet.com/b/askperf/archive/2012/02/01/using-resource-monitor-to-troubleshoot-Windows-performance-issues-part-1.aspx

    Part 2

    http://blogs.technet.com/b/askperf/archive/2012/02/08/using-resource-monitor-to-troubleshoot-Windows-performance-issues-part-2.aspx

  • where is the best place to store my information

    I migrated to the new version of the macbook, I am very happy, but the new macbook can not read the external hard drive I used to back up. It could be the fact that I need to use an adapter for USB, I'm looking for suggestions on where would be the best place for me save my information.

    What your old drive to backup link use: Firewire, perhaps? There is no adapter for FW on USB, so you can get a new enclosure that supports USB 3 then move the backup disk in the new case assuming that the disk is a SATA drive. Otherwise, buy something new to use for your backup.

  • What is the best way to store my Canon MX922? I'm not going to use it for several months (6 +).

    I don't use my printer for many months.  What is the best way to keep?  Leave the ink cartridges in the printer?  Get out them?  Store cartridges almost nine in a bag made of plastic?

    Hi mmosher,

    If your PIXMA MX922 should not be used for an extended period of time, please put your PIXMA MX922 using the power button on the unit.  It will be a "cap" of the ink tanks, so they will be ready to use when you print with your PIXMA MX922 once again.  No further action is required.

  • What is the best way to store the RCS for an insert/update in this rec

    Oracle on Win 64 non-conteneur 12.1.0.2

    When a record in one table is inserted or updated, what would be the best way to store the RCS for this record in this folder.

    I thought of a line after trigger, but did not know if this trigger to store the current_scn would still fire that trigger again (recursive trigger).

    Someone at - he a good idea of what the best way is to do?  The devs don't want to store the pk and the SNA in yet another table...

    Yes, row_dependencies would be the best way to go.  But mgmt doesn't recreate all tables for this.

    3rd party applications retrieve data from tables (all data).  We are looking for a way for them to just pull what is new or updated updated since their last sweater.

    I suggest that you try again and give all OF THE REQUIREMENTS.

    You have rejected ANY answer given and he justified using 'hidden' on what knowledge management or the devs want or do not want to. Stop making us guess what are the requirements and constraints. If you want a real answer then tell us ALL the news.

    When a record in one table is inserted or updated, what would be the best way to store the RCS for this record in this folder.

    Solomon answered repeatedly. If you want to add a column to a table to store the then "best" SNA is to let the Oracle to do this for you automatically by using the DEPENDENCY LINE.

    As he says also re-create the table to add this clause will be MUCH MORE EFFECTIVE that everything THAT you can do it manually. It will be also more accurate because Oracle will fill the value ORA_ROWSCN with the SNA at the time the line was committed. You, as long as user, can't fill a column in function when a line is engaged since real VALIDATION belongs to a transaction, not the line or the trigger that you use.

    Yes - there are two drawbacks to this method:

    1. you need to re-create the table

    2. you cannot add an index to this "hidden" column

    The devs don't want to store the pk and the SNA in yet another table...

    Then? Who cares what the devs want to do? You want the BEST solution? Next, you will need to put aside personal preferences and determine what is the 'best' solution. Why it is important that certain dev wants to do this or not?

    OK, the problem of biz is now, 3rd party external users are an all-wheel drive large number of tables in the database via the API that we wrote.  That was obviously interrupted OLTP during the day.  To reduce to the minimum, we want for them just to extract data that has been inserted/updated since their last sweater.

    It is the definition of a "replica" DB Then why don't you consider a real replicated DB? You can use DataGuard and have replicated DB which is read only that can be used to generate reports. Oracle does ALL the work to keep ALL the tables in sync. You and your developers do NOTHING!

    We thought that store the RCS higher their last sweater would allow the API to extract only data with YVERT higher than their last data pull CHN.

    OK - except you keep rejecting solutions actually do. Ask you questions about the SNA stored in the same table, but then reject the solution that does this. And then you add your "devs" don't want to store the info in a new table either.

    Then your solutions must ONLY use the replication or Log Miner. The REDO logs have all changes, if you want to extract yourself. Replication (e.g., DataGuard) will use these logs for you to maintain a replicated database.

    We thought about it, but recreate all tables in production with ROWDEPENDENCIES as well as dealing with CF and other dependencies idea this was shot.

    Well you NEVER mentioned you "thought that" and rejected it. And you NEVER mentioned anything about FKs and other dependencies. What is FKs and other dependencies which prevents this working solution? Tell us! Give us ALL the information.

    Wouldn't a trigger AFTER LINE capture the commit YVERT?  Or is after really not after validation?

    No - a trigger has NOT one commit. A trigger runs as a step in a transaction. Validation applies to the entire transaction. Until you, or Oracle, issues a commit, there is NO "committed SNA" to be stored as ORA_ROWSCN.

    You can easily see that for yourself. Create a simple table with dependencies of the line and then update two different sessions.

    create the table emp_scn rowdependencies in select * from emp where rownum<>

    Select empno, emp_scn ora_rowscn

    Update emp_scn set work = 'b' where empno = 7499

    commit;

    The first SELECT statement will show you that each row has the same SNA.

    EMPNO, ORA_ROWSCN

    7369,70622201

    7499,70622201

    7521,70622201

    Now, do the update (but no commit), then SELECT it

    EMPNO, ORA_ROWSCN

    7369,70622201

    7499,

    7521,70622201

    Where is the value of 7499? This session will NOT see a value for the changed lines in the current transaction. Other sessions will still see the old value.

    Now do the validation, then SELECT

    EMPNO, ORA_ROWSCN

    7369,70622201

    7499,70622301

    7521,70622201

    7499 now has a new and different value than the other lines. It will not be this new value until the validation occurs.

    Yes, row_dependencies would be the best way to go.  But mgmt doesn't recreate all tables for this.

    Well, you got the answer you want. You ask the best way. Now, you say that you were told the best way. But now you don't like the answer.

    How is it our fault? Your question has been answered wasn't she?

    Here are the facts:

    1 oracle creates a history of changes - the REDO log files

    2. you can use Log Miner to extract these changes

    3. you can create your own change log by adding a log file of MV to your table.

    4. you can then write a custom code to use this MV log file to determine which rows to "reproduce".

    So far reject you all THE POSSIBLE solutions.

    Accept it or change the requirements to allow one of the solutions proposed to be used.

    Personally, if I HAD to use a customized solution, I would use a MV journal to record the ROWID of the lines that have changed (for tables ROWID cannot be changed). I would then extract the appropriate lines by pulling on the lines corresponding to these row ID.

    Even that has problems since a line can be changed several times and children lines can also be amended several times - these questions FK you mentioned.

    I suggest you read this entire thread on AskTom a dozen years ago. It addresses ALL these issues.

    https://asktom.Oracle.com/pls/Apex/f?p=100:11:0:P11_QUESTION_ID:16998677475837

    Then in your next reply on this topic give us a summary of where some things with your question and what help you further expect.

  • What is the best place to download an old copy of Firefox, because I can't bear another.

    A new don't stay behind the taskbar no matter what I do, and I don't want the address bar or tabs endangered. I got to try the new version out figure. I want just an earlier copy.

    The thing is, even when it is not in mode full screen, Firefox seems to want to use the bottom of the screen. I'm going to try to solve this problem via TeamViewer since I'm a thousand miles away from him. I came up with a work around for my father tonight. I did drag the taskbar to the top of the screen and viola, Firefox does not block if it is at the top of the screen.

  • The best place to store the files in Web site on his computer?

    In years past, I stored all my files from site Web on C: > program leader > * name of site *. However, which began in the days of Windows 98 and Windows 10 you now have 'the PC' section of documents, photos, videos, etc. I have problems of permissions with registration from now files on my C: drive, and it becomes a royal pain. I was just thinking to move my Web sites off of the C: root on my computer and in one of my other sections of the computer. But my sites have photos, documents and video clips, to set up my new site location does not really fit into one of the other existing sections. I just wanted to know what path on the computer and others set up their website information? I might be able to spare me headaches in the future. Thank you.

    Dr_Atomic wrote:

    I set up a Sites folder directly on my root of the C: drive and managed to save a file to it. Then why I would be able to do the same thing except Program Files located under C:, too?  Some obscure regulation of Microsoft or something? So I'm just going to drag and drop all three of my sites the in my new folder "Sites" under my root of the C: drive. Sound good?

    You should never put anything directly in the Program Files folder. It is not an obscure regulation of Microsoft. It is there to protect you against malware surreptitiously added to your operating system.

    The Program Files folder is for program files (in other words, the software that runs on your computer). It is not for arbitrary files that you create yourself. Put all your sites the in C:\Sites is a good organization.

  • What is the best way to store the time of appointment in the calendar

    I use apex 5 universal theme.

    Oracle 11gxe.

    I need apex calendar to view the calendar...

    Do I need to use the ekinitech calendar plugin

    Or is it possible to implement

    http://fullcalendar.IO/

    I'm not aware of the java scripts, but I think I can try

    Any guidance appreciated and thank you

    Hi pauljohny100,

    There is an easy way to implement a FullCalendar.

    Take a look: https://apex.oracle.com/pls/apex/f?p=90561:1

  • Where is the best place to put custom functions?

    Hello

    I have a composition that has a number of symbols. I have to call some methods customized to the outside and I was wondering what is the best place to put custom methods?

    I saw the messages I should put the code in the event CompositionReady of the scene, but I'd like a little closer to the coast.

    Is - this best place?

    Sham.

    Here's a case:

    It is a good idea if you understand global and local variables.

    You're right about the whole event.

  • Where is the best place to put the cfqueries?

    What is the best place to get cfqueries, inside the mind of <>< / head > or before the html tag? Thank you

    So before the tag doctype? Thank you

    I just doesn't really matter.  the doctype, body, head, etc., of importance in the browser; the importance of the CF CF tags.  The browser does not see the CFML, and CF cares about the supplement a bit: he knows nothing.

    The best place - as I said - is not in the same file at all.  But if you insist on slapping your logic with your display logic, then the only consideration is that you must set your variables before you use them.  Other than: it does not matter.

    Is a review, you could do - even if she threw everything into the same file - at least separate the file itself into sections: have all your CFML code that gets your data above and try to limit the CFML you have mixed with the supplement, for example: limited to things like loops and conditions.

    But, seriously, to separate your concerns.  Dan pretty much just wrong when he says that it is too technical. It's just sloppy to do not to write a code clean, well-maintained and organized.

    --

    Adam

  • What is the best way to place an alias of the Recycle Bin on my desktop?

    Application of small trivial customization here.  Using OS X 10.11.4, what is the best way to create a trash can on the desktop?  I already tried the Terminal command to place the alias, but I'm unable to change the icon.  Given that I have with this method, how to change the folder icon image so that it represents a trash can?  I would find it useful enough to be honest.

    Thanks in advance.

    You can try to drag /System/Library/CoreServices/CoreTypes/Contents/Resources/TrashIcon.icns into the window read the information for the Alias. Upper left corner.

  • What is the best export the configuration when you want to place your video on Facebook or youtube

    What is the best export the configuration when you want to place your video on Facebook or youtube

    Hi Robert,.

    Here are the high quality requirements of Facebook: How can I ensure my videos are of high quality. Facebook Help Center | Facebook

    Formats: this video file formats can I upload? Facebook Help Center | Facebook

    YouTube: recommended encoding download - YouTube Help Center settings

    Thank you

    Kevin

  • What is the best way to backup of virtual machines on a standalone ESX with the data store local

    Hello

    I want to save the virtual machines on a host ESX autonomous. and all of these virtual machines is the local data store.  What is the best way to save these virtual machines in this situation?

    And probably we don't provision VTL on the local data center, so it is possible to use VCB to backup? And VCB is a good choice compared to the traditional method that installs the backup client in each virtual machine?   Because I think that in this situation with the data store local, it cannot not reduced the load on ESX hosts and network overhead can be avoided.

    Thank you!

    LAN

    > 1. VCB usable remote tape library? I mean it's not local library and uses the tape library to another network data center.

    VCB is completely unrelated to the tape library, it is a framework, not a backup solution. If your standard backup software can work with the remote tape library you can try it to ungrateful with VCB.

    > 2. what the difference bwteen hot - added NBD and modes if there is that an ESX host with store data local and want to use a virtual machine like VCB proxy? I think that they are the same: the VCB proxy read data through the I/O of the ESX host stack in this situation.

    NBD works on network and the backup traffic goes through the service console connection. Hot add uses special machine for assistance to connect vmdk to and uses of e/s disk stack instead of e/s network.

    > 3. Veeam Backup is free software?

    No, it isn't.

    ---

    MCSA, MCTS, VCP, VMware vExpert 2009

    http://blog.vadmin.ru

  • What would be the best approach to store the contents of an application

    Hi all,

    Whereas there are certain restrictions on the University Complutense of MADRID since the limit of files in a folder (max. 1000), that would be the best approach to store the contents of a request, for example? Is it possible to store the content with a logic of separation?

    Kind regards

    Maybe that I miss the question, but I think you are looking for a good definition of the metadata model or same good architecture of content server instances themselves.

    You wrote that you have lots of files from one application (1200 check-ins per day) and you are limited by the recommendation to have maximum 1000 files in a folder. It is a bit of a mix of apples and oranges. Records are a logical representation of file storage, who must somehow match what users a) are used for b) is useful to organizational processes. If it makes no sense in the context of your organization - just don't use them. At the University Complutense of MADRID, he must be. Unlike, the University Complutense of MADRID must always have a metadata model, and if the content search is one of your typical use cases, it is a starting point.

    You mentioned you want to separate an application an application documents X documents Y - that sounds like you have a metadata field called, for example, 'Application', which will contain the appropriate value. Unfortunately, you write more detail, so I'll make my scripts:

    -Imagine you have users who work areas or countries interested only in 'their' data - sounds like a need for one or more fields to represent this type of separation (country - State - City - whatever)
    -now, you might have another group of users who are more focused on the product; They also want to see 'their' data, but this time, the main search criteria are different (product line - product - Version - Batch, etc..)

    At the University Complutense of MADRID, you can serve both groups - you can create research and recording of profiles that meet the needs of these two types of users. It's actually more convenient than using the folders because you can have multiple views on the same repository.

    It is a "but" to this approach and that's if you want to use Desktop Integration after the check in documents from Office applications (Word, Excel). In this case, you will need records.

    However, even, there is a solution that might help: note that, so far, I expect to have a single repository (a single instance of the University Complutense of MADRID) serving all your applications. In theory, you could have a few instances UCM running in the same environment (the same number of licenses CPU, if you want). Therefore, the main criterion will be the name of the server instance of content rather than a metadata field. Another thing to consider if you want your "desktop users" for access to "all files" in the repository. Note that even if you use folders you can have files that are not assigned to any folder.

Maybe you are looking for