What is the best place to store global constants?

Hi,
I want to store some contants and access it through procedures and functions, what would be the best place to do this? I thought substitution strings would work, but it isn't working for me in my procedures. Can we use Substitution string in compile code such as procedures and functions? I use SQL developer to write procedures.
Cheers

Hi,
Table is good if "constant" might change so you can create APEX form to maintain those.
You could also use package specification just for constants e.g.
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 refer those in procedures, functions and APEX processes like (package_name.constant_name) MY_GLOBALS.g_const_1.
Regards,
Jari

Similar Messages

  • What is the best place to store salts

    Hi,
    I'm using a combination of flex ,CF and MS SQL
    Where is the best place to store salts for user passwords?

    Hi,
    Table is good if "constant" might change so you can create APEX form to maintain those.
    You could also use package specification just for constants e.g.
    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 refer those in procedures, functions and APEX processes like (package_name.constant_name) MY_GLOBALS.g_const_1.
    Regards,
    Jari

  • What is the best place to store movie content?

    I was storing my movies that I converted from dvd in a separate folder on another drive. Then I ran the consolidation option and it copied them to my music folder, within a sub folder called movies.
    Should I store them there to start with? or is there any best practices for storing them separate from itunes music and just pointing to them? I did this in the past, changed to a larger hard drive and lost all of my pointers.
    Any suggestions?

    I think it really depends on the system you have, where you store the iTunes library and how much free space you have on the main/boot drive of the computer.
    Many people use external drives, which are cheap these days, and high capacity to store the whole iTunes library and that is the option I prefer - yes it's an all eggs in one basket solution, but so long as you have the original files copied elsewhere too then there's some redundancy.
    For me the benefits are:
    - dedicated drive (or drives) for media
    - when upgrade required capacity wise could just add another ext drive and link or span the drives, or move library to higher capacity drive
    - less wear and tear on the system/boot drive
    - conserves space on my modestly size iMac system/boot drive
    I don't think there's a one size fits all answer, but if I have redundant copies elsewhere, then it makes more sense to have a dedicated library drive that might go belly up due to frequent use when streaming, but keeps media off the system/boot drive.
    AC

  • Where's the best place to store email templates?

    Hi all;
    In a web app I store all my email templates in a files folder in the web app. Can't do that with a worker in a cloud service - no files. So where's the best place to store them? In a BLOB? And if so, is there a way to have files in my project get automatically
    written to BLOB entries when I publish?
    thanks - dave
    What we did for the last 6 months -
    Made the world's coolest reporting & docgen system even more amazing

    Hi,
    I think we could use azure blob to save files.
    >>is there a way to have files in my project get automatically written to BLOB entries when I publish?
    If you choose azure cloud service, you could write the upload code at role onstart method. If you choose Azure website, please consider use azure webjob to do this, refer to
    http://azure.microsoft.com/en-us/documentation/articles/websites-dotnet-webjobs-sdk-get-started/ for more details about webjob.
    Regards

  • What is the best way to store and search 2D data

    Hi,
    There is a set of data (~10k records ) in 2D dimension.
    like this :
    Col 1, Col 2, Col3....
    What is the best way to store and search those records ?
    Thanks in advance
    Wilson

    Hi,
    Either userObjet[][] if you know how much data you have, and the data size is fixed, or use a list of lists. E.g. A Vector of Vectors (some will probably say that you should use an ArrayList instead, and that could be the case, but it sounds like you would want to display the data later on, and a DefaultTableModel (for JTables) uses a Vector as data holder).
    Kaj

  • What is the best method to store session variables

    As the title says, what is the best method to store session
    variables in a Production environment?
    I have been reading the posts on sessions and have been
    getting different ideas on where to store session variables, in a
    db, registery, cookies etc etc
    Can someone clarify possible best practice on this matter?
    Matrix

    From my experience, db is the best to store client variable
    data. Registry will cause you trouble in future (when data gets
    overloaded) and cookies will not serve the purpose for a few % of
    your users.

  • What is the best place to do an iphone speed test?

    What is the best place to do an iphone speed test? I hear some sites are not so accurate.
    I ask because i would always have speeds above 750 kbps but now im not getting more than 400kbps after i updated to 2.0.2 . I just wanna double check that my speeds actually did suddenly drop with the update.

    I am not sure these numbers are good, but I did some tests on my phone with different settings. All bars full on both Wifi, 3G and Edge using Telia here in northern Sweden (using above site):
    Wifi Download: 4.25 Mbps (4245 Kbps / 518 kB/s) transferred 2304 KB in 4.4 sec.
    Wifi Upload: 0.9 Mbps (972 Kbps / 119 kB/s) transferred 512 KB in 4.31 sec.
    3G Download: 1.17 Mbps (1177 Kbps / 143 kB/s) transferred 1280 KB in 8.9 sec.
    3G Upload: 0.16 Mbps (156 Kbps / 19 kB/s) transferred 512 KB in 26.81 sec.
    Edge Download: 0.2 Mbps (199 Kbps / 24 kB/s) transferred 256 KB in 10.5 sec.
    Edge Upload: 0.06 Mbps (60 Kbps / 7 kB/s) transferred 256 KB in 34.8 sec.
    Maybe the numbers would be different if there were a similar test site in Europe, as I often find any speed tests depends on the physical location of the test server.

  • Where is the best place to store Contacts in order to later print labels and such?

    Where is the best place to store contacts in order to later print labels etc?

    I found this excellent article last week describing how to print labels from your Mac's Contacts application:
    How-to: Print customized address labels for holiday card envelopes ...

  • My daughter is a college student. she needs to write and compile c programs on her mac for a class this semester. what is the best place for her to start to get the correct compiler etc. to use ? thanks

    my daughter is a college student. she needs to write and compile c programs on her mac for a class this semester. what is the best place for her to start to get the correct compiler etc. to use ? thanks

    If you know that you will not be asked to design GUI interfaces, and the C programming course will adhere to command line compilation environments, then get the Xcode command-line developer tools, and skip the extra complication of Xcode until you absolutely need it. Apple has kicked GNU C to the curb and is rightly so, using Clang/LLVM compiler technology.
    Sign up for a free Apple Developer account using your Apple ID, and then visit the Mac Dev Center, and towards the bottom of the page, you will see additional downloads. Click on the associated, all down loads link. Know your OS X version beforehand, as the command-line tool releases are tied to general operating system versions, and the most recent Xcode version.  That said, there are currently two March 9, 2015 command-line tools for Xcode 6.2 — one for OS X 10.9 Mavericks, and the other for OS X Yosemite.

  • What is the best way to store a battery?

    Hi,
    I have an extra MBP battery. What is the best way to store this extra battery? Should I store it when it is fully charged? or Should I store it when it is half full? Is it necessary to use that batter once in a while?
    Thank you beforehand.
    Bob

    http://www.apple.com/batteries/notebooks.html
    If you're storing it for a long time, put it away when it's about half full. If you have a couple of batteries for your MacBook, I'd recommend swapping batteries once a month or so to extend the life of both batteries.

  • How do you move pictures to an external drive to open space on the Mac hard drive? Or what is the best way to store photos safely?

    How do you move pictures to an external drive to open harddrive space? Or what is the best way to store large photo files? Ive tried copy/cut and paste and it doesnt work. I have nothing on my Mac but photos and its telling me startup disk is too full to download updates.

    Are the photos being stored in iPhoto now?
    How is the external disk formatted?
    Allan

  • What is the best way to pass a constant to a cin expecting a pointer to a value?

    I have a cin which has a leg that is expecting a pointer to a value. On the diagram, what is the best way to connect a constant widget to this leg of the cin? Connecting it directly crashes labview as it treats the constant as a pointer to memory.
    Thanks

    I am not sure that I understand your issue. CIN variables can be Input-Output or Output only. Either way, they are being passed in as a pointer to a value. You can see this very easily by placing down a CIN and wiring a constant integer to it. Next, right-click on the CIN and create the C file. You will see that the parameter list has an int* in it.
    If you are still having problems, do you have to create a CIN or can you create a DLL instead? The DLL will give you a few more ways to pass the data than a CIN does with no real performance decrease.
    Also, have you read the "Using External Code in LabVIEW" manual? This hsould answer some questions as well.
    Randy Hoskin
    Applications Engineer
    National Instruments
    http://www.ni.com/ask

  • What is the best way to store videos using Macbook Air?

    I have a Macbook Air and I don't want to store videos on the hardrive because it will fill up fast.  I have a lot of videos - for people that also take a lot of videos - what is the best way in your opinion or best place to store video? For example, on a server, on a cloud server, etc?

    Ok, so do you have a recommend brand and space capacity?
    You mentioned that one of your primary needs is to store video, which demands large capacity. As a consequence I'd suggest a drive with at least 1Tb, perhaps greater, capacity. I don't have a preferred brand or manufacturer - it's a bit like recommending which is better between Ford and Chevy - but I have a couple of Western Digital external USB drives which have proven very reliable, and a Seagate which is used as a daily backup and has worked flawlessly.
    DWB's point about backups is important too, because when you store files on any drive there is a risk of that drive failing - and indeed, all drives will fail at some point. The question is, can you live with the total loss of those files if the drive does fail? If you are storing files that you value, then a backup is needed to help protect those files. Ideally that would mean two drives, not one. One to use for the storing the files, and the second to use to back those files up.

  • What's the best way to store my info externally

    I have recently bought my first Macbook Pro 13" with 2.4 Ghz. I am currently using it for my own business and do tend to get a lot of files together. I went to look at "About this Mac" and have already got 369 Gb used up in storage... I have no idea how I have done that as I have hardly downloaded any apps on this computer besides the ones that were on here. I did download Vware Fusion 4 as I have a reservation system which I used to run on my pc and need to have this on here too so perhaps that software takes a lot of space.
    Could anyone advise on which is the best way to store my info externally, will any external harddrive do, or do you need a special one for Apple or Macbook pro. I am just asking as I have no idea and prefer to buy the right one straight away.
    Any help would be much appreciated !
    Thanks, Sara***

    Sara,
    The most reliable method is to use an external hard drive.  Some are better than others, but most will work.
    For the least amount of setup pain, I prefer to deal with the Mac specialists at OWC, http://www.macsales.com as they stand behind their products with great warranty and support.  I have one of their Mercury Elite Pro 2 TB drives that has multiple interface capability so you can get a fast interface for data transfer.
    Take a look at what they offer and see what fits your needs.  If you have more questions about doing thin, just ask on here.
    Ralph

  • What's the best way to store old FCP projects & media?

    Hey
    I've started to accumulate more and more video content of client projects, but I don't want to delete it in case they come back a year later looking for an update on the video product I made them.
    So, what's he best way to store FCP projects and video files?
    I thought maybe a BluRay burner might do the trick.
    Any suggestions?
    Sam

    Since you're using RAW files you might peruse the DAM Forum to learn about possible other DAM (digital asset management) software and workflows. There is a wealth of information at that site.
    I useMedia Expression for my primary DAM application and iPhoto for special projects like books, calendars, etc.

Maybe you are looking for

  • Report for viewing Sales order no against delivery date & actual GI date

    Hi Experts, Is there any report for viewing Sales order no against delivery date & *actual GI date* Because in VL06F , i can only able to get planned GI. Please guide regarding the same where i can get 'ACTUAL GI DATE ' against above combination . Re

  • Images in applet URGENT!!

    Hi. how do i display an image on an applet or a frame without using swing? Any code sample will help. Thanx -Raam

  • Last Week For Voting - Please vote one last time

    Hi all, We have slipped into 6th place.  We need about 100 votes in the next week to get back to the top  5. The top 5 videos are guaranteed a  spot in the finals and it would sure be nice to have a guarantee  !! Please vote this week for sure it is 

  • Encore 2.0 motion menus not previewing?

    I have been having some trouble with motion menus...I got a copy of Encore 2.0 several years ago and it worked fine then. I recently had a need for it again so I re-installed it and started a project. My problem is that even with the video transcoded

  • Dialog box pop up for a second and then disappears.

    For the past few weeks a dialog box has been appearing on my screen for a fraction of a second and then quickly dissappears. I am unable to read what it says, but in console it says:  java is listening from ::ffff:0.0.0.0:0 proto=6. It seems to happe