Why can't constants of a package not be use in view definition?

Hi,
maybe the answer is obvious, but I don't understand why this is not possible.
We have a large numer of key tables which define an ID-number (PK, generated by sequence), a short and long description as well as a numeric ID (AK1, in most cases autogenerated by max+1), which is intended for usage in programs, when a certain row of a key must be selected in the business layer. We call this column the type-ID of the key. A type-ID cannot be changed once assigned. Rows cannot be deleted physical, only logical (i.e. set column ACTIVE to FALSE).
We have a large numer of PL/SQL packages that use those type ID's. For every business object we define a globally available package that contains all necessary type ID's defined as constants, e.g.
create or replace package GLOBTEST is
CONST1 constant KEY_TABLE.TYPE_ID%type := 1;
end;
In all other packes we can use these constants (e.g. GLOBTEST.CONST1) instead of those "magic numbers". Now we have the situation that we must define quite a few views that must use those type IDs. But here we can't use these constants, e.g.
create or replace view V_TEST as
select GLOBTEST.CONST1 as CONST1 from DUAL;
results in error. What would be the best way to avoid using "magic constants"? We already defined functions which do nothing more than returning the appropriate constant. However we have the feeling that this is not the best way.
TIA,
Stefan
Message was edited by:
stefanm

Stefan,
You could try creating OBJECT views. I believe you would be able to call the constants already defined in packages in these object views. In the object views you can create member functions in case you want to do some manipulation of these constants or other data.
Shakti
http://www.impact-sol.com
Developers of Guggi Oracle - Tool for DBAs and Developers

Similar Messages

  • Why can I sync a movie but not TV shows on my nano (7th gen)?

    I am using iTunes 11.0 and can sync a movie (Miracle on 34th Street) to my new ipod nano 7th gen but when I try a TV Show (a Planet Earth HD episode) or even a brief video clip taken with my camara I am told that such an action is not permitted on this ipod.  So why can I sync a movie but not TV shows on my nano (7th gen)?  Thank you.

    Before you can sync video files, it must be converted into a format compatible with ipod.  If you can’t sync a video convert it by doing the following:
    In iTunes, select the video you want to convert. Do one of the following then sync again after:
    1) Choose File > Create New Version > Create iPod or iPhone Version.
    2) Choose File > Create New Version > Create iPad or Apple TV Version.
    I hope this works.

  • Why can I receive text messages but not send?

    Why can I receive text messages but not send. This has been happening for about 10 hours.

    Thanks for the response. Must be smart phones. My daughter has a dumb phone and she can send out. I tried deleting my text messages on the Verizon website, but they won’t delete. It must be on their end. Chat line was busy forever, until they shut it down.
    Jennifer

  • Why can't I create a new note on my iPad?

    Why can't I create a new note on my iPad?

    tammy313 wrote:
    the options in the tool bar at the bottom are not highlighted and it does not respond to my touch.
    You are talking about the forward, back, mail and trash can icons in the Notes App - correct?
    I've gone through restarting it and followed the instructions from the person last week.
    Have you restarted the iPad - is that what you mean? Have you quit and then restarted the app? Quit the app, and restart the iPad. It's worth a try.
    Double tap the home button and your recent apps will appear at the bottom. Hold down on the Notes app icon until it begins to wiggle. Then tap the minus sign to quit the app. Then tap the screen. Now restart the iPad.
    Carolyn explained this above (restart) but here it is again....
    Hold down on the sleep button until the red slider appears and slide to shut off. Hold down on the sleep button until the Apple logos appears then let go of the button and the iPad will restart. See if that helps.

  • HT203175 Why can most of my Original Files not be found ?

    Why can most of my Original Files not be found ?

    The "missing file" thing happens if the file is no longer where iTunes expects to find it. Possible causes are that you or some third party tool has moved, renamed or deleted the file, or that the drive it lives on has had a change of drive letter. It is also possible that iTunes has changed from expecting the files to be in the pre-iTunes 9 layout to post-iTunes 9 layout, or vice-versa, and so is looking in slightly the wrong place.
    Select a track with an exclamation mark, use Ctrl-I to get info, then say no when asked to locate the track. Look on the summary tab for the location that iTunes thinks the file should be. Now take a look around your hard drive(s). Hopefully you can locate the track in question. If a section of your library has simply been moved, or a drive letter has changed, it should be possible to reverse the actions. I can provide a step by step guide if you give me the two paths.
    In some cases iTunes may be able to repair itself if you go through the same steps and locate the lost track. It may then offer to attempt to automatically fix other broken links. Alternatively, as long as you can find a location holding the missing files, then you should be able to use my FindTracks script to reconnect them to iTunes.
    tt2

  • HT1725 Why can I all of a sudden not purchase on Cand Crush and on Words With Friends??  The credit card company has NOT stopped anything. I have no problems with other iTunes purchases!

    Why can I all of a sudden not purchase on Cand Crush and on Words With Friends??  The credit card company has NOT stopped anything. I have no problems with other iTunes purchases!

    Contact iTune Support
    https://ssl.apple.com/emea/support/itunes/contact.html

  • HT3500 Why can't I print from my notes?

    Why can't I print from my notes?

    HI,
    It should be able to use these devices together, how exactly are you trying to print? using airprint or one off the HP apps? And is your printer connected in a network? And is this the same network as the ipad?
    Say "Thanks" by clicking the Kudos Star in the post that helped you.
    Although I work for HP my posts and replies are my own
    Please mark the post that solves your problem as "Accepted Solution"

  • Why can i send imessage texts but not sms texts ?

    why can i send imessage texts but not sms texts ?
    When i try to send an sms text ..i get a 'not delivered' message...no error code...imessage works fine...

        Very strange, [email protected] Let's get this figured out. Make sure that SMS messages are turned on. Go to Settings>Messages>Send as SMS. Please let me know if this works.
    ChaunceyM_VZW
    Follow us on twitter @VZWSupport

  • Why can my iBook on my iPad not find the book 'Cascadia's Fault' on iTunes?

    Why can my iBook on my iPad not find the book 'Cascadia's Fault' on iTunes?

    You could use the Apple Link Maker to create a link and email to those who say they cannot find it, may also have 50 free codes to distribute to aid your marketting, if you have a website, use the link maker to create a logo a insert into your  website/FB/Twitter etc
    Its your product .. you have to market it and make it as visible as possible to others, if  you do thatwell and it sells in buckets.. Apple will be happy to move it up the list.

  • Chrome - Adobe-Acrobat/Reader can not be used to view PDF files in a web browser.

    I can't view PDF files via Chrome (it works on Internet Explorer but I prefer Chrome)  -  the error below has arisen recently on Chrome, though I can't see what has changed.
    "Acrobat plug-in
    The Adobe-Acrobat/Reader that is running can not be used to view PDF files in a web browser. Please exit  Adobe Acrobat/Reader and exit your Web Browser and try again."
    I have looked through Forum articles on similar errors and have tried the following(text copied from other Forum entries)
    Repair Adobe Acrobat (from Acrobat)
    Repair Adobe Acrobat (from Control Panel
    Configure Acrobat  as a helper application: Choose Edit > Preferences., Select Internet on the left., Deselect Display PDF In Browser Using [Acrobat application], and then click OK.Quit Acrobat or Reader
    Create a registry item for Acrobat: with Regedit: If the registry item doesn't exist on the system, do the following: Go to Edit > New > Key and create the missing HKEY_CLASSES_ROOT\Software\Adobe\Acrobat\Exe.Go to Edit > New > String Value and name this key (Default).Select (Default), and then go to Edit > Modify. Type the Adobe Acrobat path in the "Value data" for your product.,restart your computer
    Repair the HKCR\AcroExch.Document registry key: Navigate to HKEY_CLASSES_ROOT\AcroExch.Document., Right-click AcroExch.Document and select Delete; make sure that you have the correct key, and click Yes on any prompts, Right-click AcroExch.Document.7 and select Delete; make sure that you have the correct key, and click Yes on any prompts. Repair your Acrobat  installation
    None has solved the problem. However it still works ok with IE. But I want to stick with Chrome because I find IE is so slow!
    I am using Vista, with Adobe Acrobat standard 9.5.2 and Google Chrome version 23.0.1271.64 m which is marked on Chrome as 'up to date'
    Does anyone know why I might be getting this error on Chrome but not IE?

    I think I have discovered the answer to my own question!
    I have disabled Adobe Reader plug-in, and can now see PDFs in Chrome.
    (Steps: Chrome Menu, Settings option, Click Advanced Settings link, then Content Settings button, then select Disable Individual Plug-Ins, and a list of plug-ins is offered to enable or disable).
    I then get a different result depending on whether or not Chrome PDF viewer is enabled - with it enabled I see the PDF document in Chrome, or with it disabled then the option is offered to download it, but either way I can get it it via Chrome without having to run Internet explorer in another browser window.

  • Why can't I enlarge fonts on pages by using my track pad?

    Why can't I enlarge fonts on pages by using my track pad? Please Help!!!!

    Hi,
    I have been trying out the Command+ option and its not the same. Using the track pad to enlarge images and text was by far better and more precise than using the command+ option.....

  • Cant open PDF files..It says the adobe acrobat reader that is running can not be used to view files in a browser..plz suggest the solution.thanks

    Whenever i try to open a PDF file it says " The adobe/acrobar reader that is running can not be used to view files in a web browser. Plz exit adobe/acrobat readerand exit your web browser and try again." Wt do i need to do, plz suggest.
    Regards
    Aditya Bhargava

    Hi adityabhargava01-
    My first suggestion is to upgrade to the most recent version of Firefox by going to this link:
    http://www.mozilla.org/en-US/firefox/new/
    My second suggestion is to read this article on how to many your preferences on how Firefox deals with PDFs and all other file types:
    [[Options window - Applications panel]]
    I hope that helps!

  • AdobeAcrobat/Reader that is running can not be used to view PDF Files in Web Browser...what do I need to do to fix this..

    I just got Windows 7 and have been having problems since loading it. Most of my drivers only go to Vista and don't recognize 7.
    I have trying to download some manuals from their website
    and keep getting this message; Adobe Acrobat/reader that is running can not be used to view PDF files in Web Browser.

    Could I suggest a workaround for PDFs until a solution is posted? Open them directly in the Adobe application rather than in a browser tab.
    In your Adobe application(s), go to:
    Edit > Preferences > Internet
    Then uncheck "Display PDF in browser"
    (There are very few sites where having PDF integrated is really beneficial.)

  • Reader 9.2 - "can not be used to view PDF files in a web browser"

    Hello,
    I recently deployed Adobe 9.2 within our organization. I used the Adobe Customization Wizard 9 to transform the install set, and selected the "Display PDF in Browser" option as default.
    When opening a PDF linked from a web URL, we get the message: "The Adobe Acrobat/Reader that is running can not be used to view PDF files in a Web Browser. Adobe Acrobat/Reader version 8 or 9 is required. Please exit and try again." This occurs under IE8 and IE6, in both Windows XP SP2 and Windows 7.
    If I launch Adobe Reader and unselect "Display PDF in Browser" in preferences, PDFs open normally.

    I think I have discovered the answer to my own question!
    I have disabled Adobe Reader plug-in, and can now see PDFs in Chrome.
    (Steps: Chrome Menu, Settings option, Click Advanced Settings link, then Content Settings button, then select Disable Individual Plug-Ins, and a list of plug-ins is offered to enable or disable).
    I then get a different result depending on whether or not Chrome PDF viewer is enabled - with it enabled I see the PDF document in Chrome, or with it disabled then the option is offered to download it, but either way I can get it it via Chrome without having to run Internet explorer in another browser window.

  • Adobe Acrobat/Reader can not be used to view PDF's in Web browser.

    Does any one came accross the following message trying to view PDF's in web browser? "Adobe Acrobat/Reader that is running can not be used to view PDF documents in Web browser. Please exit the Acrobat?Reader application and try again". Thanks for your help! Barbara

    http://helpx.adobe.com/acrobat/using/display-pdf-browser-acrobat-xi.html

Maybe you are looking for

  • Printing of tax amounts in PO Smart Form

    Hi all, I want to print the tax condition amounts calculated by a tax code for each line item in Purchase Order smart form.  From which tables and fields can I get the data. thanks in advance.

  • Error 10038 when trying to setup an ODBC Client DSN

    TimesTen 7.0.5.0.0 as well as 11.2.1.4.0 on some PC's return a TCP Reset when an ODBC Client DSN attempts to connect. The trace in the tterrors.log file for the 11.2 release is: 10:54:59.64 Err : SRV: 13732: EventID=3| Socket send() failed. Error (10

  • TS5150 No audio from my Apple TV.

    Have a 3rd gen Apple TV but I'm getting no audio.  I've tried the standard recommendations but nothing yet.  Further advise would be great.

  • Everything is HD, but exporting in 16:9 is impossible

    This is so frustrating. Final Cut Express HD is perfect for widescreen. iDVD is perfect for widescreen. So, why is it so freakin' hard to export in 16:9 and get it on iDVD and onto a DVD to play in 16:9? Please help. I don't actually care if it comes

  • How to guide for Fine tuning the performance of SAP EP

    All, Could anyone please let me know where to locate the how to guide for fine tuning the performance of the SAP Enterprise Portal? thanks, ~L