Is this a new usage in PL/SQL?

Hi friends,
Today I've tested new features in 11G, and read the Document "Oracle Database 11g: The Top New Features for DBAs and Developers" and when I come to page 226 chapter PL/SQL Performance, I see this code as follows:
alter session set plsql_warnings = ‘enable:all, disable:06002, disable:06005, disable:06006,
disable:06010’
alter session set plsql_ccflags = ‘simple:false’
create package gcd_test is
procedure time_it;
end gcd_test;
create package body gcd_test is
$if $$simple $then
subtype my_integer is simple_integer;
simple constant times.simple%type := ‘y’;
$else
subtype my_integer is pls_integer not null;
simple constant times.simple%type := ‘n’;
$end
Frankly I have never seen that package body can be defined like this...
the dollar sign with the logic operators, never seen in PL/SQL reference book and then I tested in 11G, it won't cause any error.
I can't remember this usage in any document...
so if anybody knows about that, I need your help~
Edited by: user12977032 on Jul 2, 2010 12:09 AM

user12977032 wrote:
I mean the code is like some way to define variables dynamically, or following some rules.Not really. This new feature is a standard feature in most compilers. It allows you to define and set compiler flags and variables and perform conditional compilation.
For example, you may have a PL/SQL package that is used on Standard Edition (SE) and Enterprise Edition (EE). However, you would like to use a EE feature that is not available on SE (SE for example requires a slower method to be used).
With conditional compiling you can define a code block that needs to be compiled for EE versions and a different code block that needs to be compiled for SE. Thus you have source code that can be compiled optimally for that server version it is being compiled on.
This feature has existed for many years in compilers ranging from C to Delphi. And has been sorely missing from the PL/SQL parser and compiler.

Similar Messages

  • Sybase connection tab not showing in New connection option in SQL developer

    Hi,
    I do not see a Sybase connection tab in New connection option in SQL developer 2.1 where as it was available in ver 1.5
    Why is that? how to fix it?

    Hi,
    Have you installed the JTDS JDBC driver yet into SQL Developer.
    This is required before you get the connection tab for SQL Server and Sybase.
    You can install the JTDS driver from the Check For Updates action.
    Regards,
    Dermot
    SQL Developer Team

  • Create new MySQL Database with SQL

    I have a simple question, :-)
    how can I create a new MySQL Database with SQL - (JDBC)
    can you show me a code example?
    tank you ...

    okay ... but how do I use the URL ??? that's the problem
    I tried this:
    Connection con   = null;
            Vector vct       = new Vector();
            try{
                String drv = "org.gjt.mm.mysql.Driver";
                String url = "jdbc:mysql://111.222.333.444:3306";
                String name = "myname";
                String pass = "mypass";
                Class.forName(drv);
                con = DriverManager.getConnection(url,name,pass);
                String statement = "CREATE DATABASE TestDB_Don1";
                Statement stm = con.createStatement();
                stm.execute(statement);
                stm.close();
                con.close();                         
            catch(Exception e){ e.printStackTrace(); }but it doesen't work ............. what is wrong ?

  • Im getting this error after trying to laounch SQL*Plus

    Hallo, guys!
    Help me on this one. I'm new to Oracle on Windows 2000 Professional
    Im getting this error after trying to laounch SQL*Plus
    Error 6 Initializing SQL*Plus
    Message file spl<lang>.msb not found
    SP2-0750:You may need to set ORACLE_HOME to your Oracle Software directory
    Urgent please respond
    Thanks
    sridhar

    Verify the contents of the following subkey in your Windows2000 registry:
    HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_YOUR_HOME_NAME
    Your Windows 2000 registry must contain several minimum parameters, defined as registry entries inside the above subkey (See http://download-east.oracle.com/docs/cd/B19306_01/win.102/b14304/registry.htm#i1006544). One of them is ORACLE_HOME, which could have been accidentally removed or changed. ORACLE_HOME must contain the home OS path to the SQL*Plus executable in your machine (For example, C:\Oracle\OraDB10g). I tried changing the name of the ORACLE_HOME registry entry in my machine and received the same exact messages you did when launching SQL*Plus.
    In your OS, verify also Control Panel > System Properties > Advanced > Environment Variables > System Variables > Path, and make sure the above ORACLE_HOME's path is included in the Path variable (preferably in the starting position)
    Regards,
    Luis Morales
    ConsiteNicaragua.com

  • New Line in PL/SQL

    Hi
    Everyone know C Language.In C , we have new line.For example;
    printf("Sankar\n");
    Here '\n' is for new line
    Can any 1 tell new line in PL/SQL lang
    Regards,
    Sankar.C

    Hi
    Not like dude... For example
    This is one String:
    dbms_output.put_line("Sankaranarayananmeganthinformatix");
    My output is:
    Sankaranarayanan
    meganthinformatix
    i want to split into 2 lines.
    How to split this string in PL/SQL
    Regards,
    Sankar.C

  • Resisting the creation of new log files when SQL SERVER is restarted

    Hi,
    I know that when SQL server is restarted new log files are created. But is it possible to resist creating new log fils and insert log data in the existing log files that are used before restarting the sql server

    Hello,
    I guess Raghvendra answered your question. And as per your previous post its not clear what you want to ask an you did not revert. Again if your issue is solved appreciate if you can please mark the answer and vote the posts helpful.
     Can I continue to log in the same file.?
    What does this line mean exactly ? Yes SQL Server will continue to use same transaction log file(LDF file) for writing information as it was using before shutdown. If you are talking about errorlog file a new errorlog file would be created which you can
    read using
    sp_readerrorlog
    Even if you stopped SQL Server service mistakenly its not that server is gone. Yes when you stopped the server all inflight transactions are rolled back. And when SQL Server would come online it would undergo crash recovery and would bring all the databases
    online by reading transaction log file and performing redo and undo of information. All committed transaction would be rolled forward and uncommitted would be rolled back.
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
    My Technet Wiki Article
    MVP

  • I have done absalutely nothing to my 4g apple ipod touch, and it over heats, won't hold a charge, and the front camera will not work. I bought this brand new in december, and i've barely used it. I've tried restarting it and everything, what should i do?

    I have done absalutely nothing to my 4g apple ipod touch, and it over heats, won't hold a charge, and the front camera will not work. I bought this brand new in december, and i've barely used it. I've tried restarting it and everything, I honestly think this is out raging because i spend over $200 on this. To have for music and instagram. I use it about an hour a day, but i've only been using it for about 3 months although i've had it since December. Any suggestions that may help me?

    Try:
    - A reset. Nothing is lost
    Reset iPod touch: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Restore from backup
    - Restore to factory settings/new iPod
    If still problem make an appointment at the Genius Bar of an Apple store.

  • I have had no choice but to reconfigure my computer and couldn't back up my itunes, how do i do this in new zealand? I have downloaded icloud and it shows all my purchases back to 2009 how do i download these again?

    I have had no choice but tok reconfigure my computer and couldn't back up my itunes, how do i do this in new zealand, i have downloaded i cloud but this does not seem to work due to being outside the USA.

    Currently you can only re-download music purchases in the US, it hasn't been rolled out to the rest of the world yet. Have you not got a backup of your purchases on external or flash drives or CDs/DVDs ? If so then you can copy that back onto your computer and add them to iTunes.

  • I have set up a Netgear dual band modem which works well with the iPhone and an older MacBook, but with this brand new MacBook it asks for a password every time I reopen the computer and open safari. Is it Lion?

    I have set up a Netgear dual band modem which works well with the iPhone and an older MacBook, but with this brand new MacBook it asks for a password every time I reopen the computer and open safari. As you can imagine this is very annoying. It says I am not connected to the internet and offers me a choice of nearby networks including mine and then asks for a password when I select it. Why does it do this with our new MacBooks (also with my son's brand new one) and not with the iPhone, iPad and older MacBook? They happily automatically connect to our network after entering the password just the once.

    Sig, I appreciate you trying to be helpful. I have no idea what issues you were having or what issue exactly pgrounds has been having. Your assumption that everyone's set up is the same as yours is false however. There are many many documented WiFi issues that are a result of Lion installs. Many have been solved by 10.7.1 and 10.7.2. Others have been solved by a large variety of work arounds. Others have not had their issues solved yet.
    I am one of those. I have an IT background, and I spent the better of five hours digging up workarounds and attempting all of them. For the benefit oh anyone who is having similar issues, I have posted links to all of those workarounds here. None of them worked in my case, but hopefully they will help pgrounds or others.
    So, once again, if you have a new idea, I'd love to here it. But if it has already been posted in one of these links, it's not helpful, let it go.
    http://osxdaily.com/2011/07/22/wifi-dropping-in-os-x-lion-fixes/
    http://osxdaily.com/2011/11/06/lion-wi-fi-problems-solution-mac/
    http://blog.chron.com/techblog/2011/09/want-to-really-repair-permissions-on-your -mac-try-this/

  • Words like "tomorrow night" give the option to create event. Is this a new feature?

    I send the message "tomorrow night" and these two words underlined and provide an option to create an event!
    Is this a new feature or is me that just discover it?
    Che

    I know it was working with numbers like "15:30" but i never seen before to work with phrases? (a simple "tomorrow" won't work.)

  • In the old Numbers I could change the colour of a checkbox using rules - I cannot seem to do this in new Numbers 2013?

    In the old Numbers I could change the colour of a checkbox using rules - I cannot seem to do this in new Numbers 2013?
    I have an old Numbers sheet where I could make the checkbox Cell go Green when ticking "Equal to" TRUE. When I open the old sheet it into new iWork it functions correctly. But I am unable to copy or paste the rule - nor recreate it.
    Any suggestions on how to create a Conditional checkbox cell that goes green once ticked would be most apprecicated.
    Thanks - Steve

    Numbers 3.0 is missing the logic-based "equal to TRUE" or "equal to FALSE" conditions for conditional formatting.  The replacement is text based: "text is TRUE" or "text is FALSE".  You can apply these rules to cells formatted as checkboxes.

  • Neither my ipad or ipod are being recognized by itunes so i can't transfer songs from itunes playlists to the two devices. this is new, as far as a week ago i transferred music from the computer to the ipod. can anyone help?

    neither my ipad or ipod are being recognized by itunes so i can't transfer songs from itunes playlists to the two devices. this is new, as far as a week ago i transferred music from the computer to the ipod. can anyone help?

    Hey lightc,
    If you are having an issue with iTunes not recognizing your iPad and iPod on your Windows computer, I would suggest that you troubleshoot using the steps in this article - 
    iPhone, iPad, or iPod not recognized in iTunes for Windows
    Thanks for using Apple Support Communities.
    Happy computing,
    Brett L 

  • My iMac keeps crashing after AHT checked out. Running 10.7.4. Purchased this mac new about 2.5 years ago..

    My iMac keeps crashing after AHT checked out. Running 10.7.4. Purchased this mac new about 2.5 years ago.  Mail crashed and I can't get it to re-import mail.  Safari crashes often.  Entire computer crashes at least 2 times a day.  I ran permessions in utiltiies.  Do not know where to go next?

    Good afternoon,
    I have followed all previous describes steps and all has been great for a week but just crashed again....
    Fri Sep 14 19:12:03 2012
    panic(cpu 1 caller 0xffffff8000301702): "new_vnode: vp (0xffffff801f93a078) on RAGE list not marked VLIST_RAGE"@/SourceCache/xnu/xnu-1699.26.8/bsd/vfs/vfs_subr.c:3546
    Backtrace (CPU 1), Frame : Return Address
    0xffffff80e87bb760 : 0xffffff8000220792
    0xffffff80e87bb7e0 : 0xffffff8000301702
    0xffffff80e87bb870 : 0xffffff80004ddf0c
    0xffffff80e87bb960 : 0xffffff80004f1f7d
    0xffffff80e87bbb20 : 0xffffff80005041db
    0xffffff80e87bbb50 : 0xffffff80004d4c8f
    0xffffff80e87bbc00 : 0xffffff80004d3eda
    0xffffff80e87bbe10 : 0xffffff8000319293
    0xffffff80e87bbe70 : 0xffffff800030613c
    0xffffff80e87bbf50 : 0xffffff80005cd61b
    0xffffff80e87bbfb0 : 0xffffff80002daa13
    BSD process name corresponding to current thread: backupd
    Mac OS version:
    11E53
    Kernel version:
    Darwin Kernel Version 11.4.0: Mon Apr  9 19:32:15 PDT 2012; root:xnu-1699.26.8~1/RELEASE_X86_64
    Kernel UUID: System model name: iMac10,1 (Mac-F2268CC8)
    System uptime in nanoseconds: 82852757487046
    last loaded kext at 29873830462021: com.apple.filesystems.smbfs          1.7.2 (addr 0xffffff7f81101000, size 241664)
    last unloaded kext at 14387986152655: com.apple.driver.AppleUSBCDC          4.1.17 (addr 0xffffff7f80791000, size 12288)
    loaded kexts:
    com.FTDI.driver.FTDIUSBSerialDriver          2.2.14
    com.eltima.ElmediaPlayer.kext          1.0
    com.apple.filesystems.smbfs          1.7.2
    com.apple.driver.AppleUSBCDC          4.1.17
    com.apple.driver.AppleHWSensor          1.9.5d0
    com.apple.driver.AppleBluetoothMultitouch          70.12
    com.apple.filesystems.autofs          3.0
    com.apple.driver.AppleMikeyHIDDriver          122
    com.apple.driver.AGPM          100.12.42
    com.apple.driver.AppleHDA          2.2.0f3
    com.apple.driver.AudioAUUC          1.59
    com.apple.driver.IOBluetoothSCOAudioDriver          4.0.5f11
    com.apple.driver.IOBluetoothA2DPAudioDriver          4.0.5f11
    com.apple.driver.AppleMikeyDriver          2.2.0f3
    com.apple.driver.AppleUpstreamUserClient          3.5.9
    com.apple.driver.AppleMCCSControl          1.0.26
    com.apple.iokit.IOUserEthernet          1.0.0d1
    com.apple.iokit.IOBluetoothSerialManager          4.0.5f11
    com.apple.Dont_Steal_Mac_OS_X          7.0.0
    com.apple.driver.AudioIPCDriver          1.2.2
    com.apple.driver.AppleBacklight          170.1.9
    com.apple.driver.ACPI_SMC_PlatformPlugin          5.0.0d0
    com.apple.GeForce          7.1.8
    com.apple.driver.AppleLPC          1.5.8
    com.apple.driver.BroadcomUSBBluetoothHCIController          4.0.5f11
    com.apple.driver.AppleIRController          312
    com.apple.AppleFSCompression.AppleFSCompressionTypeDataless          1.0.0d1
    com.apple.AppleFSCompression.AppleFSCompressionTypeZlib          1.0.0d1
    com.apple.BootCache          33
    com.apple.driver.AppleUSBCardReader          3.0.1
    com.apple.iokit.SCSITaskUserClient          3.2.0
    com.apple.driver.XsanFilter          404
    com.apple.iokit.IOAHCISerialATAPI          2.0.3
    com.apple.iokit.IOAHCIBlockStorage          2.0.3
    com.apple.driver.AppleFWOHCI          4.8.9
    com.apple.driver.AirPort.Atheros40          504.64.2
    com.apple.driver.AppleAHCIPort          2.3.0
    com.apple.driver.AppleEFINVRAM          1.5.0
    com.apple.driver.AppleUSBHub          4.5.0
    com.apple.nvenet          2.0.17
    com.apple.driver.AppleUSBEHCI          4.5.8
    com.apple.driver.AppleUSBOHCI          4.4.5
    com.apple.driver.AppleRTC          1.5
    com.apple.driver.AppleHPET          1.6
    com.apple.driver.AppleACPIButtons          1.5
    com.apple.driver.AppleSMBIOS          1.8
    com.apple.driver.AppleACPIEC          1.5
    com.apple.driver.AppleAPIC          1.5
    com.apple.driver.AppleIntelCPUPowerManagementClient          193.0.0
    com.apple.nke.applicationfirewall          3.2.30
    com.apple.security.quarantine          1.3
    com.apple.driver.AppleIntelCPUPowerManagement          193.0.0
    com.apple.driver.AppleBluetoothHIDKeyboard          160.7
    com.apple.driver.AppleHIDKeyboard          160.7
    com.apple.driver.AppleMultitouchDriver          231.4
    com.apple.driver.IOBluetoothHIDDriver          4.0.5f11
    com.apple.kext.triggers          1.0
    com.apple.driver.DspFuncLib          2.2.0f3
    com.apple.iokit.IOFireWireIP          2.2.4
    com.apple.driver.AppleSMBusController          1.0.10d0
    com.apple.iokit.IOSurface          80.0.2
    com.apple.iokit.IOSerialFamily          10.0.5
    com.apple.iokit.IOAudioFamily          1.8.6fc17
    com.apple.kext.OSvKernDSPLib          1.3
    com.apple.driver.ApplePolicyControl          3.0.16
    com.apple.driver.AppleSMBusPCI          1.0.10d0
    com.apple.driver.AppleHDAController          2.2.0f3
    com.apple.iokit.IOHDAFamily          2.2.0f3
    com.apple.driver.AppleGraphicsControl          3.0.16
    com.apple.driver.AppleBacklightExpert          1.0.3
    com.apple.driver.AppleSMC          3.1.3d8
    com.apple.driver.IOPlatformPluginLegacy          5.0.0d0
    com.apple.nvidia.nv50hal          7.1.8
    com.apple.NVDAResman          7.1.8
    com.apple.iokit.IONDRVSupport          2.3.2
    com.apple.iokit.IOGraphicsFamily          2.3.2
    com.apple.driver.IOPlatformPluginFamily          5.1.0d17
    com.apple.driver.AppleUSBBluetoothHCIController          4.0.5f11
    com.apple.iokit.IOBluetoothFamily          4.0.5f11
    com.apple.iokit.IOUSBHIDDriver          4.4.5
    com.apple.iokit.IOSCSIBlockCommandsDevice          3.2.0
    com.apple.driver.AppleUSBMergeNub          4.5.3
    com.apple.iokit.IOSCSIMultimediaCommandsDevice          3.2.0
    com.apple.iokit.IOBDStorageFamily          1.6
    com.apple.iokit.IODVDStorageFamily          1.7
    com.apple.iokit.IOCDStorageFamily          1.7
    com.apple.iokit.IOUSBMassStorageClass          3.0.1
    com.apple.driver.AppleUSBComposite          4.5.8
    com.apple.iokit.IOSCSIArchitectureModelFamily          3.2.0
    com.apple.iokit.IOFireWireFamily          4.4.5
    com.apple.iokit.IO80211Family          420.3
    com.apple.iokit.IOAHCIFamily          2.0.8
    com.apple.driver.AppleEFIRuntime          1.5.0
    com.apple.iokit.IOUSBUserClient          4.5.8
    com.apple.iokit.IONetworkingFamily          2.1
    com.apple.iokit.IOUSBFamily          4.5.8
    com.apple.driver.NVSMU          2.2.9
    com.apple.iokit.IOHIDFamily          1.7.1
    com.apple.iokit.IOSMBusFamily          1.1
    com.apple.security.sandbox          177.5
    com.apple.kext.AppleMatch          1.0.0d1
    com.apple.security.TMSafetyNet          7
    com.apple.driver.DiskImages          331.6
    com.apple.iokit.IOStorageFamily          1.7.1
    com.apple.driver.AppleKeyStore          28.18
    com.apple.driver.AppleACPIPlatform          1.5
    com.apple.iokit.IOPCIFamily          2.6.8
    com.apple.iokit.IOACPIFamily          1.4

  • Why am I not able to export NEF files to Photoshop from Lightroom to edit. This is new. When I right click on an image, the export to PS option is not selectable.

    Why am I not able to export NEF files to Photoshop from Lightroom to edit. This is new. When I right click on an image, the export to PS option is not selectable. I've never had this happen before. I haven't used it for a few weeks, so maybe there's an update (Mac or otherwise) that's screwing things up? HELP!

    I have an Edit In - Photoshop option, but not an Export - Photoshop option.
    Obviously to have right-click Edit In to work, the photo you're right-clicking on needs to be selected.  I assume this is not the problem, and that the photo is selected.
    Mavericks 10.9.3 has a problem where the Users folder is hidden, and you need to update iTunes to fix it, but it's been a few weeks since this happened so hopefully you're up-to-date and the Users folder isn't hidden anymore.
    If you can't get things to work, I'd uninstall LR and uninstall Photoshop, then install Photoshop, and update it, then install LR and update it, as a way to get any wayward security or other OS-level things reset.

  • Safari on my iPad 4 opens the latest page used rather than my home page. This is new ,after I updated to IOS 8.3.How do I get it back to what it was?

    Safari on my iPad 4 opens the latest page used rather than to my home page.
    This is new ,after I updated to IOS 8.3.How do I get it back to what it was?

    You're welcome. You're not alone. The change has left alot of people scratchiing their heads wondering why. Maybe if enough people leave feedback at the link below it will be changed.
    http://www.apple.com/feedback/

Maybe you are looking for

  • Buttons and enter key problem

    hello, there are a few projects of enterprise quality which I am developing in java swing. I found out through research that many or rather most people involved with java believe that swing is ready for enterprise class robust desktop applications. s

  • PDF to database

    Hi, I am new to LiveCycle and looking for a solution. I have forms like immigration forms that has many field user has to fill. My question - As LiveCycle generates PDF forms is there a way that user fill the forms on line and when he submits I send

  • Adding a page later

    I'd like a blog page for my site in the future. Should I add it now in my site map and tell it to "Exclude page from menus"? Or is it easy to add a page after a site is published?

  • Kernel programming using Java

    I'm currently doing a research in computer security and would like to develop a system which can deal directly to linux kernel in order to enhance the security. During my research I found that Java is a type-safe language which is more secure if I de

  • Stats up after creating iWeb site

    I'm in the process of creating a site on my host server (not .mac account). I have a lot of video on my site and pretty much keep track of the hits and kb activity on my host server. After I created my first basic set of pages I've noticed a huge jum