Help with a check constraint

I have inadvertantly posted this in the wrong section, so I am reposting this in the SQL section and marking this one as answered.
Hi,
I have a question regarding creating a constraint against two tables. I have an FK in table_A that should check the constraint against two related tables. Table_A is the table that holds the FK and tables B and C hold the PK back to table A. The problem is with my constraint FK I receive the message ORA-02251: subquery not allowed here. I need to ensure that the AFK contains the FK value that is in either TABLE_B or TABLE_C .
In my create statement I have
CREATE TABLE TABLE_A
     (_PK INTEGER NOT NULL ENABLE,
     _FK INTEGER NOT NULL ENABLE,
     CONSTRAINT A__PK PRIMARY KEY (_PK) ENABLE,
     CONSTRAINT A__FK CHECK (_FK IN (SELECT FK FROM TABLEB UNION SELECT FK FROM TABLEC)) ENABLE
Thanks
Edited by: user11947229 on Oct 10, 2009 11:43 AM

"FK value that is in either TABLE_B or TABLE_C"
This is exactly what is not constraint! Constraint is against one object not set of objects like in your case.

Similar Messages

  • New iMac extremely slow following migration (Help  with Etre Check diagnosis)

    Hi gurus,
    New iMac - scheduled for genius bar on Friday but trying to avoid the trip.  Migrated everything over from 2009 macbook pro to 2011 macbook and now 2013 iMac.  I imagine there is a lot of cruft from the repeated migrations and am close to just wiping and migrating from scratch.  I don't know, however, how to get my old mail and other critical settings over.
    Problem is clearly in the user account.  I created a separate admin account and that runs relatively fine.  Is the below user account salvageable? Should I delete all my old permissions?  Any tips would be appreciated.  Thanks for the Etrecheck program,
    Problem description:
    Application hangs and system unresponsive in migrated user account
    EtreCheck version: 2.1.8 (121)
    Report generated February 16, 2015 at 4:48:06 PM PST
    Download EtreCheck from http://etresoft.com/etrecheck
    Click the [Click for support] links for help with non-Apple products.
    Click the [Click for details] links for more information about that line.
    Hardware Information: ℹ️
        iMac (21.5-inch, Late 2013) (Technical Specifications)
        iMac - model: iMac14,1
        1 2.7 GHz Intel Core i5 CPU: 4-core
        8 GB RAM Upgradeable
            BANK 0/DIMM0
                4 GB DDR3 1600 MHz ok
            BANK 1/DIMM0
                4 GB DDR3 1600 MHz ok
        Bluetooth: Good - Handoff/Airdrop2 supported
        Wireless:  en1: 802.11 a/b/g/n/ac
    Video Information: ℹ️
        Intel Iris Pro
            iMac 1920 x 1080
    System Software: ℹ️
        OS X 10.10.2 (14C109) - Time since boot: 4:51:57
    Disk Information: ℹ️
        APPLE HDD HTS541010A9E662 disk0 : (1 TB)
            EFI (disk0s1) <not mounted> : 210 MB
            Macintosh HD (disk0s2) / : 999.35 GB (585.74 GB free)
            Recovery HD (disk0s3) <not mounted>  [Recovery]: 650 MB
    USB Information: ℹ️
        TOSHIBA External USB 3.0 2 TB
            EFI (disk3s1) <not mounted> : 210 MB
            Time Capsule (disk3s2) <not mounted> : 2.00 TB
        Western Digital My Book 1130 2 TB
            EFI (disk1s1) <not mounted> : 210 MB
            ACbook (disk1s2) <not mounted> : 2.00 TB
        Centon DataStick 30.93 GB
            EFI (disk2s1) <not mounted> : 210 MB
            Install OS X Yosemite (disk2s2) /Volumes/Install OS X Yosemite : 30.59 GB (25.27 GB free)
        Apple Inc. FaceTime HD Camera (Built-in)
        Apple Inc. BRCM20702 Hub
            Apple Inc. Bluetooth USB Host Controller
    Thunderbolt Information: ℹ️
        Apple Inc. thunderbolt_bus
    Gatekeeper: ℹ️
        Mac App Store and identified developers
    Kernel Extensions: ℹ️
            /System/Library/Extensions
        [not loaded]    com.Cycling74.driver.Soundflower (1.4.2) [Click for support]
        [not loaded]    com.eltima.ElmediaPlayer.kext (1.58 - SDK 10.4) [Click for support]
        [not loaded]    com.logmein.hamachi (1.0) [Click for support]
        [not loaded]    com.seagate.driver.PowSecDriverCore (5.1.1) [Click for support]
        [not loaded]    com.wdc.driver.1394HP (1.0.7) [Click for support]
        [not loaded]    com.wdc.driver.USBHP (1.0.7) [Click for support]
        [loaded]    net.telestream.driver.TelestreamAudio (1.1.0 - SDK 10.8) [Click for support]
            /System/Library/Extensions/Seagate Storage Driver.kext/Contents/PlugIns
        [not loaded]    com.seagate.driver.PowSecLeafDriver_10_4 (5.1.1) [Click for support]
        [not loaded]    com.seagate.driver.PowSecLeafDriver_10_5 (5.1.1) [Click for support]
        [not loaded]    com.seagate.driver.SeagateDriveIcons (5.1.1) [Click for support]
    Problem System Launch Agents: ℹ️
        [killed]    com.apple.accountsd.plist
        [killed]    com.apple.AirPlayUIAgent.plist
        [killed]    com.apple.bird.plist
        [killed]    com.apple.CallHistoryPluginHelper.plist
        [killed]    com.apple.CallHistorySyncHelper.plist
        [killed]    com.apple.cloudd.plist
        [killed]    com.apple.cmfsyncagent.plist
        [killed]    com.apple.coreservices.appleid.authentication.plist
        [killed]    com.apple.coreservices.uiagent.plist
        [killed]    com.apple.iconservices.iconservicesagent.plist
        [killed]    com.apple.Maps.pushdaemon.plist
        [killed]    com.apple.nsurlsessiond.plist
        [killed]    com.apple.pluginkit.pkd.plist
        [killed]    com.apple.recentsd.plist
        [killed]    com.apple.SafariNotificationAgent.plist
        [killed]    com.apple.sbd.plist
        [killed]    com.apple.scopedbookmarkagent.xpc.plist
        [killed]    com.apple.secd.plist
        [killed]    com.apple.secinitd.plist
        [killed]    com.apple.security.cloudkeychainproxy.plist
        [killed]    com.apple.spindump_agent.plist
        [killed]    com.apple.tccd.plist
        [killed]    com.apple.telephonyutilities.callservicesd.plist
        23 processes killed due to memory pressure
    Problem System Launch Daemons: ℹ️
        [killed]    com.apple.AssetCacheLocatorService.plist
        [killed]    com.apple.awdd.plist
        [killed]    com.apple.coresymbolicationd.plist
        [killed]    com.apple.ctkd.plist
        [killed]    com.apple.diagnosticd.plist
        [killed]    com.apple.GSSCred.plist
        [killed]    com.apple.iconservices.iconservicesagent.plist
        [killed]    com.apple.iconservices.iconservicesd.plist
        [killed]    com.apple.ifdreader.plist
        [killed]    com.apple.MobileFileIntegrity.plist
        [killed]    com.apple.nehelper.plist
        [killed]    com.apple.nsurlsessiond.plist
        [killed]    com.apple.periodic-daily.plist
        [killed]    com.apple.sandboxd.plist
        [killed]    com.apple.secinitd.plist
        [killed]    com.apple.softwareupdate_download_service.plist
        [killed]    com.apple.spindump.plist
        [killed]    com.apple.sysmond.plist
        [killed]    com.apple.systemstatsd.plist
        [killed]    com.apple.tccd.system.plist
        [killed]    com.apple.wdhelper.plist
        [killed]    org.cups.cupsd.plist
        22 processes killed due to memory pressure
    Launch Agents: ℹ️
        [loaded]    com.google.keystone.agent.plist [Click for support]
        [not loaded]    com.maintain.LogOut.plist [Click for support]
        [not loaded]    com.maintain.Restart.plist [Click for support]
        [not loaded]    com.maintain.ShutDown.plist [Click for support]
        [not loaded]    com.maintain.Sleep.plist [Click for support]
        [running]    com.maintain.SystemEvents.plist [Click for support]
        [loaded]    com.oracle.java.Java-Updater.plist [Click for support]
        [running]    com.seagate.SeagateStorageGauge.plist [Click for support]
        [loaded]    org.macosforge.xquartz.startx.plist [Click for support]
    Launch Daemons: ℹ️
        [loaded]    com.adobe.fpsaud.plist [Click for support]
        [running]    com.bombich.ccchelper.plist [Click for support]
        [running]    com.crashplan.engine.plist [Click for support]
        [running]    com.eltima.ElmediaPlayer.daemon.plist [Click for support]
        [failed]    com.google.GoogleML.plist [Click for support]
        [loaded]    com.google.keystone.daemon.plist [Click for support]
        [loaded]    com.microsoft.office.licensing.helper.plist [Click for support]
        [loaded]    com.oracle.java.Helper-Tool.plist [Click for support]
        [loaded]    com.rogueamoeba.hermes.plist [Click for support]
        [failed]    com.vmware.launchd.vmware.plist [Click for support]
        [running]    com.zqueue.servetome-server.plist [Click for support]
        [loaded]    jp.co.canon.MasterInstaller.plist [Click for support]
        [loaded]    net.sourceforge.MonolingualHelper.plist [Click for support]
        [loaded]    org.macosforge.xquartz.privileged_startx.plist [Click for support]
    User Launch Agents: ℹ️
        [running]    .dat0598.40e (hidden) [Click for support]
            /usr/bin/osascript /usr/bin/osascript osascript -e tell application "Folder Actions Dispatcher" to tick
        [unknown]    .datdf56.40b (hidden) [Click for support]
        [loaded]    com.adobe.ARM.[...].plist [Click for support]
        [failed]    com.amazon.cloud-player.plist [Click for support]
        [running]    com.amazon.music.plist [Click for support]
        [running]    com.microsoft.LaunchAgent.SyncServicesAgent.plist [Click for support]
        [running]    com.mlbam.nexdef.plist [Click for support]
    User Login Items: ℹ️
        iTunesHelper    Application  (/Applications/iTunes.app/Contents/MacOS/iTunesHelper.app)
        Canon IJ Network Scanner Selector2    UNKNOWN  (missing value)
        Dropbox    Application  (/Applications/Dropbox.app)
        ACbook    UNKNOWN  (missing value)
        CrashPlan menu bar    UNKNOWN  (missing value)
        CrashPlan menu bar    Application  (/Applications/CrashPlan.app/Contents/Helpers/CrashPlan menu bar.app)
        Canon IJ Network Scanner Selector EX    Application  (/Applications/Canon Utilities/IJ Network Scanner Selector EX/Canon IJ Network Scanner Selector EX.app)
        Caffeine    UNKNOWN  (missing value)
    Internet Plug-ins: ℹ️
        EPPEX Plugin: Version: 10.0 [Click for support]
        Flash Player: Version: 16.0.0.305 - SDK 10.6 [Click for support]
        SlingPlayer: Version: Unknown - SDK 10.8 [Click for support]
        AdobePDFViewer: Version: 9.5.5 [Click for support]
        Leap Web Player: Version: LeapPlayer version 2.0.2f2 [Click for support]
        Unity Web Player: Version: UnityPlayer version 3.5.5f4 - SDK 10.6 [Click for support]
        nppanda3d: Version: Unknown [Click for support]
        googletalkbrowserplugin: Version: 5.40.2.0 - SDK 10.8 [Click for support]
        iPhotoPhotocast: Version: 7.0 - SDK 10.8
        RealPlayer Plugin: Version: Unknown [Click for support]
        QuickTime Plugin: Version: 7.7.3
        FlashPlayer-10.6: Version: 16.0.0.305 - SDK 10.6 [Click for support]
        DivXBrowserPlugin: Version: 1.4 [Click for support]
        Silverlight: Version: 4.0.60129.0 [Click for support]
        CoolirisWebKitPlugin: Version: Unknown [Click for support]
        Google Earth Web Plug-in: Version: 6.0 [Click for support]
        Default Browser: Version: 600 - SDK 10.10
        Easy-WebPrint EX: Version: 1.0.0 [Click for support]
        o1dbrowserplugin: Version: 5.40.2.0 - SDK 10.8 [Click for support]
        Flip4Mac WMV Plugin: Version: 2.3.8.1 [Click for support]
        SharePointBrowserPlugin: Version: 14.4.3 - SDK 10.6 [Click for support]
        ContentUploaderPlugin: Version: 1.2 [Click for support]
        JavaAppletPlugin: Version: Java 8 Update 31 Check version
    User internet Plug-ins: ℹ️
        Picasa: Version: 1.0 [Click for support]
    3rd Party Preference Panes: ℹ️
        RCDefaultApp
        Flash Player  [Click for support]
        Flip4Mac WMV  [Click for support]
        Java  [Click for support]
        Perian  [Click for support]
    Time Machine: ℹ️
        Skip System Files: NO
        Mobile backups: OFF
        Auto backup: NO - Auto backup turned off
        Volumes being backed up:
            Macintosh HD: Disk size: 999.35 GB Disk used: 413.60 GB
        Destinations:
            Untitled [Local]
            Total size: 0 B
            Total number of backups: 0
            Oldest backup: -
            Last backup: -
            Size of backup disk: Too small
                Backup size 0 B < (Disk used 413.60 GB X 3)
    Top Processes by CPU: ℹ️
            11%    BitdefenderVirusScanner
             7%    WindowServer
             1%    loginwindow
             0%    SystemUIServer
             0%    dpd
    Top Processes by Memory: ℹ️
        94 MB    BitdefenderVirusScanner
        60 MB    Finder
        34 MB    mds_stores
        26 MB    CrashPlanService
        26 MB    WindowServer
    Virtual Memory Information: ℹ️
        34 MB    Free RAM
        1.24 GB    Active RAM
        1.23 GB    Inactive RAM
        1.81 GB    Wired RAM
        37.21 GB    Page-ins
        1.05 GB    Page-outs
    Diagnostics Information: ℹ️
        Feb 16, 2015, 04:30:47 PM    /Users/[redacted]/Library/Logs/DiagnosticReports/BitdefenderVirusScanner_2015-0 2-16-163047_[redacted].crash
        Feb 16, 2015, 02:41:32 PM    /Library/Logs/DiagnosticReports/firefox_2015-02-16-144132_[redacted].hang
        Feb 16, 2015, 02:40:05 PM    /Users/[redacted]/Library/Logs/DiagnosticReports/garcon_2015-02-16-144005_[reda cted].crash
        Feb 16, 2015, 01:21:20 PM    /Users/[redacted]/Library/Logs/DiagnosticReports/BitdefenderVirusScanner_2015-0 2-16-132120_[redacted].crash
        Feb 16, 2015, 11:56:57 AM    /Library/Logs/DiagnosticReports/Folder Actions Dispatcher_2015-02-16-115657_[redacted].cpu_resource.diag [Click for details]
        Feb 16, 2015, 11:50:54 AM    /Library/Logs/DiagnosticReports/com.zqueue.servetome-server_2015-02-16-115054_[ redacted].crash
        Feb 16, 2015, 11:49:07 AM    Self test - passed
        Feb 16, 2015, 09:55:04 AM    /Library/Logs/DiagnosticReports/Folder Actions Dispatcher_2015-02-16-095504_[redacted].cpu_resource.diag [Click for details]
        Feb 16, 2015, 09:44:52 AM    /Library/Logs/DiagnosticReports/Folder Actions Dispatcher_2015-02-16-094452_[redacted].cpu_resource.diag [Click for details]
        Feb 15, 2015, 03:02:01 PM    /Library/Logs/DiagnosticReports/ClamXav_2015-02-15-150201_[redacted].hang
        Feb 15, 2015, 02:58:45 PM    /Users/[redacted]/Library/Logs/DiagnosticReports/garcon_2015-02-15-145845_[reda cted].crash
        Feb 15, 2015, 12:35:39 AM    /Library/Logs/DiagnosticReports/Folder Actions Dispatcher_2015-02-15-003539_[redacted].cpu_resource.diag [Click for details]
        Feb 15, 2015, 12:19:21 AM    /Library/Logs/DiagnosticReports/CrashPlanService_2015-02-15-001921_[redacted].c pu_resource.diag [Click for details]
        Feb 14, 2015, 11:45:36 PM    /Library/Logs/DiagnosticReports/Folder Actions Dispatcher_2015-02-14-234536_[redacted].cpu_resource.diag [Click for details]
        Feb 14, 2015, 07:00:58 PM    /Library/Logs/DiagnosticReports/Folder Actions Dispatcher_2015-02-14-190058_[redacted].cpu_resource.diag [Click for details]
        Feb 14, 2015, 03:54:47 PM    /Users/[redacted]/Library/Logs/DiagnosticReports/ClamXav_2015-02-14-155447_[red acted].crash
        Feb 14, 2015, 03:18:24 PM    /Library/Logs/DiagnosticReports/Folder Actions Dispatcher_2015-02-14-151824_[redacted].cpu_resource.diag [Click for details]

    Everything is included below.  Shortly before I ran the script I disabled folder actions which appeared to have a bunch of redundant and scripts that were taking close to 6-7 gigs of ram,   It'll be interesting to review the below.  Thanks Mr. Davis, you are a major resource, 
    Start time: 09:12:51 02/17/15
    Revision: 1241
    Model Identifier: iMac14,1
    System Version: OS X 10.10.2 (14C109)
    Kernel Version: Darwin 14.1.0
    Time since boot: 7:55
    UID: 501
    USB
        My Book 1130 (Western Digital Technologies, Inc.)
        External USB 3.0 (Toshiba America Info. Systems, Inc.)
        DataStick (Alcor Micro, Corp.)
    Bluetooth
        Apple Magic Mouse
        Apple Wireless Keyboard
    Activity
        CPU: user 18%, system 19%
    CPU usage (%)
        mds (UID 0): 19.5
    I/O wait time (ms/s)
        mds (UID 0): 1156
        mdworker (UID 89): 186
    I/O requests (KiB/s)
        mds (UID 0): 4892
    System errors (per sec)
        mdworker (UID 89, error 2): 158
        mds (UID 0, error 2): 149
        mds (UID 0, error 20): 116
    Trusted certs (user)
        63.197.157.203
    Firewall: On
    Listeners
        kdc: kerberos
        launchd: afpovertcp
        launchd: microsoft-ds
        launchd: printer
        launchd: ssh
    System caches/logs
        1166 MB: /Library/Caches/CrashPlan/42/cpfmf
    Diagnostic reports
        2015-02-14 ClamXav crash
        2015-02-15 ClamXav hang
        2015-02-15 garcon crash
        2015-02-16 BitdefenderVirusScanner crash x2
        2015-02-16 Kernel gpuRestart
        2015-02-16 com.zqueue.servetome-server crash
        2015-02-16 firefox hang
        2015-02-16 garcon crash
    I/O errors
        disk3s2: data underrun 1
        disk1s2: do_jnl_io: strategy err 0x6 2
    Volumes
        disk0s2: /
        disk1s2: /Volumes/Install
        disk3s2: /Volumes/ACbook
        disk2s2: /Volumes/Time
    Kernel log
        Feb 15 09:48:38 warning: loginwindow(73) performed out-of-band resume on ClamXav(2059)
        Feb 15 09:48:38 warning: loginwindow(73) performed out-of-band resume on Console(2347)
        Feb 15 09:48:38 warning: loginwindow(73) performed out-of-band resume on iTunes(2727)
        Feb 15 09:48:43 IOAudioStream[0xffffff802f3abc00]::clipIfNecessary() - Error: counted 1 clip more than one buffer ahead errors.
        Feb 15 14:53:10 warning: loginwindow(73) performed out-of-band resume on ClamXav(2059)
        Feb 15 14:56:36 warning: loginwindow(73) performed out-of-band resume on ClamXav(2059)
        Feb 16 09:39:13 utun_start: ifnet_disable_output returned error 12
        Feb 16 10:07:25 Trying restart GPU ...
        Feb 16 11:43:50 jnl: disk1s2: write_journal_header: error writing the journal header!
        Feb 16 11:43:51 jnl: disk1s2: close: journal 0xffffff802b4daa80, is invalid.  aborting outstanding transactions
        Feb 16 11:51:14 utun_start: ifnet_disable_output returned error 12
        Feb 16 11:57:11 jnl: disk1s2: write_journal_header: error writing the journal header!
        Feb 16 11:57:11 jnl: disk1s2: close: journal 0xffffff8025c1cc20, is invalid.  aborting outstanding transactions
        Feb 16 14:22:43 Limiting closed port RST response from 423 to 250 packets per second
        Feb 16 14:24:06 Limiting closed port RST response from 264 to 250 packets per second
        Feb 16 14:24:28 Limiting closed port RST response from 324 to 250 packets per second
        Feb 16 14:24:42 Limiting closed port RST response from 251 to 250 packets per second
        Feb 17 01:18:41 Sleep failure code 0x00000088 0x14006700
        Feb 17 01:18:41 System was rebooted due to Sleep/Wake failure
        Feb 17 01:18:41 Failed to open swap file 30
        Feb 17 01:18:41 vm_swap_create_file failed @ 19 secs
        Feb 17 01:18:41 USBF:    20.861    AppleUSBHubPort::FatalError - Port 1 of Hub at 0x14800000 reported error 0xe00002ed while doing getting port status (4)
        Feb 17 01:18:41 USBF:    20.861    AppleUSBHubPort::FatalError - Port 1 of Hub at 0x14800000 reported error 0xe00002c0 while doing clearing port feature (2)
        Feb 17 01:19:29 utun_start: ifnet_disable_output returned error 12
        Feb 17 08:10:16 [IOBluetoothHCIController][handleACLPacketTimeout] -- Disconnecting due to device not responding (ACL Packet timed out) for connection handle 0x40
    System log
        Feb 17 09:08:56 Finder assertion failed: 14C109: libxpc.dylib + 40320 [UUID]: 0x13
        Feb 17 09:08:56 Finder assertion failed: 14C109: libxpc.dylib + 40320 [UUID]: 0x13
        Feb 17 09:08:56 Finder assertion failed: 14C109: libxpc.dylib + 40320 [UUID]: 0x13
        Feb 17 09:08:56 Finder assertion failed: 14C109: libxpc.dylib + 40320 [UUID]: 0x13
        Feb 17 09:08:56 Finder assertion failed: 14C109: libxpc.dylib + 40320 [UUID]: 0x13
        Feb 17 09:08:56 Finder assertion failed: 14C109: libxpc.dylib + 40320 [UUID]: 0x13
        Feb 17 09:08:56 Finder assertion failed: 14C109: libxpc.dylib + 40320 [UUID]: 0x13
        Feb 17 09:08:56 Finder assertion failed: 14C109: libxpc.dylib + 40320 [UUID]: 0x13
        Feb 17 09:08:56 Finder assertion failed: 14C109: libxpc.dylib + 40320 [UUID]: 0x13
        Feb 17 09:08:56 Finder assertion failed: 14C109: libxpc.dylib + 40320 [UUID]: 0x13
        Feb 17 09:08:56 Finder assertion failed: 14C109: libxpc.dylib + 40320 [UUID]: 0x13
        Feb 17 09:08:56 Finder assertion failed: 14C109: libxpc.dylib + 40320 [UUID]: 0x13
        Feb 17 09:08:56 Finder assertion failed: 14C109: libxpc.dylib + 40320 [UUID]: 0x13
        Feb 17 09:08:56 Finder assertion failed: 14C109: libxpc.dylib + 40320 [UUID]: 0x13
        Feb 17 09:08:56 Finder assertion failed: 14C109: libxpc.dylib + 40320 [UUID]: 0x13
        Feb 17 09:08:56 Finder assertion failed: 14C109: libxpc.dylib + 40320 [UUID]: 0x13
        Feb 17 09:08:56 Finder assertion failed: 14C109: libxpc.dylib + 40320 [UUID]: 0x13
        Feb 17 09:08:56 Finder assertion failed: 14C109: libxpc.dylib + 40320 [UUID]: 0x13
        Feb 17 09:08:56 Finder assertion failed: 14C109: libxpc.dylib + 40320 [UUID]: 0x13
        Feb 17 09:08:56 Finder assertion failed: 14C109: libxpc.dylib + 40320 [UUID]: 0x13
        Feb 17 09:08:56 Finder assertion failed: 14C109: libxpc.dylib + 40320 [UUID]: 0x13
        Feb 17 09:09:31 WindowServer disable_update_timeout: UI updates were forcibly disabled by application "Safari" for over 1.00 seconds. Server has re-enabled them.
        Feb 17 09:09:31 WindowServer WSGetSurfaceInWindow : Invalid surface 687364876 for window 227
        Feb 17 09:09:37 WindowServer disable_update_timeout: UI updates were forcibly disabled by application "Safari" for over 1.00 seconds. Server has re-enabled them.
        Feb 17 09:09:38 WindowServer WSGetSurfaceInWindow : Invalid surface 1046946449 for window 227
    Console log
        Feb 17 07:47:09 nsurlstoraged The read-connection to the DB=/Users/USER/Library/Caches/com.apple.icloud.fmfd/Cache.db is NOT valid.  Unable to determine schema version.
        Feb 17 07:47:09 nsurlstoraged realpath() returned NULL for /Users/USER/Library/Caches/com.apple.icloud.fmfd
        Feb 17 07:47:09 nsurlstoraged realpath() returned NULL for /Users/USER/Library/Caches/com.apple.icloud.fmfd
        Feb 17 07:47:53 nsurlstoraged realpath() returned NULL for /Users/USER/Library/Caches/com.apple.icloud.fmfd
        Feb 17 07:47:53 nsurlstoraged The read-connection to the DB=/Users/USER/Library/Caches/com.apple.icloud.fmfd/Cache.db is NOT valid.  Unable to determine schema version.
        Feb 17 07:47:53 nsurlstoraged realpath() returned NULL for /Users/USER/Library/Caches/com.apple.icloud.fmfd
        Feb 17 07:47:53 nsurlstoraged realpath() returned NULL for /Users/USER/Library/Caches/com.apple.icloud.fmfd
        Feb 17 07:54:18 ReportCrash Invoking spindump for pid=9255 wakeups_rate=757 duration=60 because of excessive wakeups
        Feb 17 07:54:59 ReportCrash Invoking spindump for pid=9269 wakeups_rate=1144 duration=40 because of excessive wakeups
        Feb 17 08:09:53 ReportCrash Invoking spindump for pid=417 wakeups_rate=252 duration=179 because of excessive wakeups
        Feb 17 08:15:34 ReportCrash Invoking spindump for pid=9290 wakeups_rate=203 duration=222 because of excessive wakeups
        Feb 17 08:18:12 ReportCrash Invoking spindump for pid=6328 wakeups_rate=185 duration=244 because of excessive wakeups
        Feb 17 08:28:18 ReportCrash Invoking spindump for pid=9314 wakeups_rate=3955 duration=12 because of excessive wakeups
        Feb 17 08:32:28 ReportCrash Invoking spindump for pid=9321 wakeups_rate=609 duration=74 because of excessive wakeups
        Feb 17 08:36:08 ReportCrash Invoking spindump for pid=9331 wakeups_rate=573 duration=79 because of excessive wakeups
        Feb 17 08:38:36 ReportCrash Invoking spindump for pid=9348 wakeups_rate=1503 duration=30 because of excessive wakeups
        Feb 17 08:41:49 ReportCrash Invoking spindump for pid=9378 wakeups_rate=725 duration=63 because of excessive wakeups
        Feb 17 08:45:39 ReportCrash Invoking spindump for pid=9390 wakeups_rate=398 duration=114 because of excessive wakeups
        Feb 17 08:49:04 ReportCrash Invoking spindump for pid=9420 thread=174222 percent_cpu=63 duration=143 because of excessive cpu utilization
        Feb 17 08:50:57 nsurlstoraged Error: execSQLStatement:onConnection:toCompletionWithRetry - SQL=COMMIT;, error-code=1, error-message=cannot commit - no transaction is active
        Feb 17 08:51:18 mdworker Error loading /Applications/GarageBand.app/Contents/Library/Spotlight/GarageBandSpotlightImpo rter.mdimporter/Contents/MacOS/GarageBandSpotlightImporter:  dlopen(/Applications/GarageBand.app/Contents/Library/Spotlight/GarageBandSpotli ghtImporter.mdimporter/Contents/MacOS/GarageBandSpotlightImporter, 262): Library not loaded: @rpath/MAFiles.framework/Versions/A/MAFiles
         Referenced from: /Applications/GarageBand.app/Contents/Library/Spotlight/GarageBandSpotlightImpo rter.mdimporter/Contents/MacOS/GarageBandSpotlightImporter
         Reason: image not found
        Feb 17 08:51:18 mdworker Cannot find function pointer MetadataImporterPluginFactory for factory UUID in CFBundle/CFPlugIn 0x7f8b9870c650 </Applications/GarageBand.app/Contents/Library/Spotlight/GarageBandSpotlightImp orter.mdimporter> (bundle, not loaded)
        Feb 17 09:10:19 nsurlstoraged ERROR: unable to get the receiver data from the DB!
    Loaded kernel extensions
        net.telestream.driver.TelestreamAudio (1.1.0)
    Daemons
        com.adobe.fpsaud
        com.apple.AccountPolicyHelper
        com.apple.CodeSigningHelper
        com.apple.Kerberos.kdc
        - status: 1
        com.apple.MobileFileIntegrity
        com.apple.aelwriter
        com.apple.awdd
        com.apple.cache_delete
        com.apple.cfprefsd.xpc.daemon
        com.apple.coreduetd
        com.apple.coresymbolicationd
        com.apple.ctkd
        com.apple.diagnosticd
        com.apple.dpd
        - status: 75
        com.apple.icloud.findmydeviced
        com.apple.iconservices.iconservicesagent
        com.apple.iconservices.iconservicesd
        com.apple.ifdreader
        com.apple.nehelper
        com.apple.networkd_privileged
        com.apple.nsurlsessiond_privileged
        com.apple.nsurlstoraged
        com.apple.periodic-daily
        com.apple.periodic-weekly
        com.apple.sandboxd
        com.apple.secinitd
        com.apple.softwareupdate_download_service
        com.apple.softwareupdated
        com.apple.spindump
        com.apple.sysmond
        com.apple.systemstatsd
        com.apple.tccd.system
        com.apple.watchdogd
        com.apple.wdhelper
        com.bombich.ccchelper
        com.eltima.ElmediaPlayer.daemon
        com.google.GoogleML
        - status: 1
        com.google.keystone.daemon
        com.microsoft.office.licensing.helper
        com.oracle.java.Helper-Tool
        com.rogueamoeba.hermes
        com.vmware.launchd.vmware
        - status: 78
        com.zqueue.servetome-server
        jp.co.canon.MasterInstaller
        net.sourceforge.MonolingualHelper
        org.cups.cupsd
        org.macosforge.xquartz.privileged_startx
    Agents
        com.adobe.ARM.UUID
        com.amazon.cloud-player
        - status: 78
        com.amazon.music
        com.apple.Safari
        com.apple.photostream-agent
        com.google.keystone.system.agent
        com.maintain.SystemEvents
        com.microsoft.SyncServicesAgent
        com.mlbam.nexdef
        com.oracle.java.Java-Updater
        com.seagate.SeagateStorageGauge.plist
        org.macosforge.xquartz.startx
    User overrides
        com.apple.imagent.monaco
        com.apple.FTMonitor
        com.apple.apsd-ft
    User login items
        iTunesHelper
        - /Applications/iTunes.app/Contents/MacOS/iTunesHelper.app
        Canon IJ Network Scanner Selector2
        - missing value
        Dropbox
        - /Applications/Dropbox.app
        ACbook
        - /Volumes/ACbook
        CrashPlan menu bar
        - missing value
        CrashPlan menu bar
        - /Applications/CrashPlan.app/Contents/Helpers/CrashPlan menu bar.app
        Canon IJ Network Scanner Selector EX
        - /Applications/Canon Utilities/IJ Network Scanner Selector EX/Canon IJ Network Scanner Selector EX.app
        Caffeine
        - missing value
    Firefox extensions
        Mozilla Firefox hotfix
        Hide My ***! Web Proxy
        FoxyProxy Standard
        Jesper Staun Hansen
        Torrent Tornado
        Torrent Finder Toolbar
    Widgets
        iStat nano
    iCloud errors
        bird 405
        cloudd 68
        CallHistorySyncHelper 6
        Safari 4
        accountsd 2
    Continuity errors
        lsuseractivityd 8
        Safari 2
    Restricted files: 43
    Lockfiles: 22
    Accessibility
        Keyboard Zoom: On
        Scroll Zoom: On
    Contents of /Library/LaunchAgents/com.maintain.LogOut.plist
        - mod date: Feb  9 20:01:50 2015
        - checksum: 2486542021
        <?xml version="1.0" encoding="UTF-8"?>
        <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
        <plist version="1.0">
        <dict>
        <key>Disabled</key>
        <true/>
        <key>Label</key>
        <string>com.maintain.LogOut</string>
        <key>ProgramArguments</key>
        <array>
        <string>/usr/bin/osascript</string>
        <string>-e</string>
        <string>delay 3</string>
        <string>-e</string>
        <string>try</string>
        <string>-e</string>
        <string>do shell script &quot;killall Cocktail&quot;</string>
        <string>-e</string>
        <string>end try</string>
        <string>-e</string>
        <string>ignoring application responses</string>
        <string>-e</string>
        <string>try</string>
        <string>-e</string>
        <string>tell application &quot;System Events&quot; to log out</string>
        ...and 7 more line(s)
    Contents of /Library/LaunchAgents/com.maintain.Restart.plist
        - mod date: Feb  9 19:55:16 2015
        - checksum: 1856196442
        <?xml version="1.0" encoding="UTF-8"?>
        <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
        <plist version="1.0">
        <dict>
        <key>Disabled</key>
        <true/>
        <key>Label</key>
        <string>com.maintain.Restart</string>
        <key>ProgramArguments</key>
        <array>
        <string>/usr/bin/osascript</string>
        <string>-e</string>
        <string>delay 3</string>
        <string>-e</string>
        <string>try</string>
        <string>-e</string>
        <string>do shell script &quot;killall Cocktail&quot;</string>
        <string>-e</string>
        <string>end try</string>
        <string>-e</string>
        <string>ignoring application responses</string>
        <string>-e</string>
        <string>try</string>
        <string>-e</string>
        <string>tell application &quot;System Events&quot; to restart</string>
        ...and 7 more line(s)
    Contents of /Library/LaunchAgents/com.maintain.ShutDown.plist
        - mod date: Feb  9 19:55:17 2015
        - checksum: 2131448796
        <?xml version="1.0" encoding="UTF-8"?>
        <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
        <plist version="1.0">
        <dict>
        <key>Disabled</key>
        <true/>
        <key>Label</key>
        <string>com.maintain.ShutDown</string>
        <key>ProgramArguments</key>
        <array>
        <string>/usr/bin/osascript</string>
        <string>-e</string>
        <string>delay 3</string>
        <string>-e</string>
        <string>try</string>
        <string>-e</string>
        <string>do shell script &quot;killall Cocktail&quot;</string>
        <string>-e</string>
        <string>end try</string>
        <string>-e</string>
        <string>ignoring application responses</string>
        <string>-e</string>
        <string>try</string>
        <string>-e</string>
        <string>tell application &quot;System Events&quot; to shut down</string>
        ...and 7 more line(s)
    Contents of /Library/LaunchAgents/com.maintain.Sleep.plist
        - mod date: Feb  9 20:01:53 2015
        - checksum: 2684026111
        <?xml version="1.0" encoding="UTF-8"?>
        <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
        <plist version="1.0">
        <dict>
        <key>Disabled</key>
        <true/>
        <key>Label</key>
        <string>com.maintain.Sleep</string>
        <key>ProgramArguments</key>
        <array>
        <string>/usr/bin/osascript</string>
        <string>-e</string>
        <string>delay 3</string>
        <string>-e</string>
        <string>try</string>
        <string>-e</string>
        <string>do shell script &quot;killall Cocktail&quot;</string>
        <string>-e</string>
        <string>end try</string>
        <string>-e</string>
        <string>ignoring application responses</string>
        <string>-e</string>
        <string>try</string>
        <string>-e</string>
        <string>tell application &quot;System Events&quot; to sleep</string>
        ...and 7 more line(s)
    Contents of /Library/LaunchAgents/com.maintain.SystemEvents.plist
        - mod date: Feb  9 19:55:17 2015
        - checksum: 1297325733
        <?xml version="1.0" encoding="UTF-8"?>
        <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
        <plist version="1.0">
        <dict>
        <key>Disabled</key>
        <false/>
        <key>KeepAlive</key>
        <true/>
        <key>Label</key>
        <string>com.maintain.SystemEvents</string>
        <key>ProgramArguments</key>
        <array>
        <string>/System/Library/CoreServices/System Events.app/Contents/MacOS/System Events</string>
        </array>
        <key>RunAtLoad</key>
        <true/>
        </dict>
        </plist>
    Contents of /Library/LaunchAgents/com.oracle.java.Java-Updater.plist
        - mod date: Feb  6 15:45:52 2015
        - checksum: 655956191
        <?xml version="1.0" encoding="UTF-8"?>
        <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
        <plist version="1.0">
        <dict>
        <key>Label</key>
        <string>com.oracle.java.Java-Updater</string>
        <key>ProgramArguments</key>
        <array>
        <string>/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Resources/Java Updater.app/Contents/MacOS/Java Updater</string>
        <string>-bgcheck</string>
        </array>
        <key>StandardErrorPath</key>
        <string>/dev/null</string>
        <key>StandardOutPath</key>
        <string>/dev/null</string>
        <key>StartCalendarInterval</key>
        <dict>
        <key>Hour</key>
        <integer>17</integer>
        <key>Minute</key>
        <integer>49</integer>
        <key>Weekday</key>
        <integer>1</integer>
        </dict>
        </dict>
        ...and 1 more line(s)
    Contents of /Library/LaunchAgents/com.seagate.SeagateStorageGauge.plist
        - mod date: Mar 10 08:38:47 2010
        - checksum: 3262128215
        <?xml version="1.0" encoding="UTF-8"?>
        <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
        <!--
           com.seagate.SeagateStorageGauge.plist
           SeagateDiagnostics
           Created by John Brisbin on 3/10/10.
           Copyright 2010 Seagate Technologies LLC.. All rights reserved.
        -->
        <plist version="1.0">
        <dict>
        <key>KeepAlive</key>
        <true/>
        <key>Label</key>
        <string>com.seagate.SeagateStorageGauge.plist</string>
        <key>LimitLoadToSessionType</key>
        <string>Aqua</string>
        <key>OnDemand</key>
        <false/>
        <key>ProgramArguments</key>
        <array>
        <string>/Library/Application Support/Seagate/Seagate Storage Gauge.app/Contents/MacOS/Seagate Storage Gauge</string>
        <string>-doautolnch</string>
        <string>/Library/Application Support/Seagate/Seagate Storage Gauge.app</string>
        </array>
        <key>RunAtLoad</key>
        ...and 3 more line(s)
    Contents of /Library/LaunchDaemons/com.bombich.ccchelper.plist
        - mod date: Feb  6 13:35:20 2015
        - checksum: 495358405
        <?xml version="1.0" encoding="UTF-8"?>
        <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
        <plist version="1.0">
        <dict>
        <key>Label</key>
        <string>com.bombich.ccchelper</string>
        <key>MachServices</key>
        <dict>
        <key>com.bombich.ccchelper</key>
        <true/>
        </dict>
        <key>Program</key>
        <string>/Library/PrivilegedHelperTools/com.bombich.ccchelper</string>
        <key>ProgramArguments</key>
        <array>
        <string>/Library/PrivilegedHelperTools/com.bombich.ccchelper</string>
        </array>
        <key>RunAtLoad</key>
        <true/>
        </dict>
        </plist>
    Contents of /Library/LaunchDaemons/com.crashplan.engine.plist
        - mod date: Jan 10 11:46:36 2015
        - checksum: 757054163
        <?xml version="1.0" encoding="UTF-8"?>
        <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
        <plist version="1.0">
        <dict>
        <key>Label</key>
        <string>com.crashplan.engine</string>
        <key>UserName</key>
        <string>root</string>
        <key>GroupName</key>
        <string>wheel</string>
        <key>Nice</key>
        <integer>20</integer>
        <key>KeepAlive</key>
        <true/>
        <key>OnDemand</key>
        <false/>
        <key>RunAtLoad</key>
        <true/>
        <key>AbandonProcessGroup</key>
        <true/>
        <key>WorkingDirectory</key>
        <string>/Applications/CrashPlan.app/Contents/Resources/Java</string>
        <key>ProgramArguments</key>
        <array>
        <string>/Applications/CrashPlan.app/Contents/MacOS/CrashPlanService</string>
        ...and 26 more line(s)
    Contents of /Library/LaunchDaemons/com.eltima.ElmediaPlayer.daemon.plist
        - mod date: Oct  9 06:40:45 2012
        - checksum: 1274124936
        <?xml version="1.0" encoding="UTF-8"?>
        <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
        <plist version="1.0">
        <dict>
        <key>Disabled</key>
        <false/>
        <key>KeepAlive</key>
        <false/>
        <key>Label</key>
        <string>com.eltima.ElmediaPlayer.daemon</string>
        <key>LaunchOnlyOnce</key>
        <true/>
        <key>OnDemand</key>
        <false/>
        <key>ProgramArguments</key>
        <array>
        <string>/Library/Application Support/ElmediaPlayer/empdaemon</string>
        </array>
        <key>RunAtLoad</key>
        <true/>
        </dict>
        </plist>
    Contents of /Library/LaunchDaemons/com.google.GoogleML.plist
        - mod date: Mar 10 10:19:30 2008
        - checksum: 315725308
        <?xml version="1.0" encoding="UTF-8"?>
        <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
        <plist version="1.0">
        <dict>
        <key>Label</key>
        <string>com.google.GoogleML</string>
        <key>OnDemand</key>
        <true/>
        <key>ProgramArguments</key>
        <array>
        <string>/Library/Google/GoogleML/GoogleML.bundle/Contents/MacOS/googleml-modwat ch</string>
        </array>
        <key>RunAtLoad</key>
        <true/>
        <key>StandardOutPath</key>
        <string>/dev/null</string>
        <key>UserName</key>
        <string>root</string>
        <key>WatchPaths</key>
        <array>
        <string>/Library/Google/GoogleML/Modules</string>
        <string>/Library/Google/GoogleML</string>
        </array>
        </dict>
        </plist>
    Contents of /Library/LaunchDaemons/com.rogueamoeba.hermes.plist
        - mod date: Jul 15 21:05:58 2008
        - checksum: 1539233627
        <?xml version="1.0" encoding="UTF-8"?>
        <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
        <plist version="1.0">
        <dict>
        <key>GroupName</key>
        <string>wheel</string>
        <key>Label</key>
        <string>com.rogueamoeba.hermes</string>
        <key>ProgramArguments</key>
        <array>
        <string>/usr/local/hermes/bin/hermesctl</string>
        <string>update</string>
        </array>
        <key>RunAtLoad</key>
        <true/>
        <key>ServiceIPC</key>
        <true/>
        <key>UserName</key>
        <string>root</string>
        <key>WatchPaths</key>
        <array>
        <string>/usr/local/hermes/modules</string>
        </array>
        </dict>
        </plist>
    Contents of /Library/LaunchDaemons/com.vmware.launchd.vmware.plist
        - mod date: Nov  2 16:11:08 2007
        - checksum: 1467462916
        <?xml version="1.0" encoding="UTF-8"?>
        <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
                "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
        <plist version="1.0">
        <dict>
                <key>Label</key>
                <string>com.vmware.launchd.vmware</string>
                <key>ProgramArguments</key>
                <array>
                        <string>/Library/Application Support/VMware Fusion/boot.sh</string>
                        <string>--start</string>
                </array>
                <key>RunAtLoad</key>
                <true/>
        </dict>
        </plist>
    Contents of /Library/LaunchDaemons/com.zqueue.servetome-server.plist
        - mod date: Sep 22 07:54:14 2014
        - checksum: 1392131937
        <?xml version="1.0" encoding="UTF-8"?>
        <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
        <plist version="1.0">
        <dict>
        <key>KeepAlive</key>
        <dict>
        <key>PathState</key>
        <dict>
        <key>/Library/Application Support/ServeToMe/incoming/settings.xml</key>
        <true/>
        </dict>
        <key>SuccessfulExit</key>
        <false/>
        </dict>
        <key>Label</key>
        <string>com.zqueue.servetome-server</string>
        <key>ProgramArguments</key>
        <array>
        <string>/Library/PrivilegedHelperTools/com.zqueue.servetome-server</string>
        </array>
        <key>RunAtLoad</key>
        <true/>
        <key>ThrottleInterval</key>
        <integer>5</integer>
        </dict>
        ...and 1 more line(s)
    Contents of /Library/LaunchDaemons/jp.co.canon.MasterInstaller.plist
        - mod date: Nov 11 12:21:11 2014
        - checksum: 4111951265
        <?xml version="1.0" encoding="UTF-8"?>
        <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
        <plist version="1.0">
        <dict>
        <key>Label</key>
        <string>jp.co.canon.MasterInstaller</string>
        <key>Program</key>
        <string>/Library/PrivilegedHelperTools/jp.co.canon.MasterInstaller</string>
        <key>ProgramArguments</key>
        <array>
        <string>/Library/PrivilegedHelperTools/jp.co.canon.MasterInstaller</string>
        </array>
        <key>ServiceIPC</key>
        <true/>
        <key>Sockets</key>
        <dict>
        <key>MasterSocket</key>
        <dict>
        <key>SockFamily</key>
        <string>Unix</string>
        <key>SockPathMode</key>
        <integer>438</integer>
        <key>SockPathName</key>
        <string>/var/run/jp.co.canon.MasterInstaller.socket</string>
        <key>SockType</key>
        ...and 5 more line(s)
    Contents of /Library/LaunchDaemons/net.sourceforge.MonolingualHelper.plist
        - mod date: Sep 16 12:53:32 2012
        - checksum: 4229206510
        <?xml version="1.0" encoding="UTF-8"?>
        <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
        <plist version="1.0">
        <dict>
        <key>Label</key>
        <string>net.sourceforge.MonolingualHelper</string>
        <key>MachServices</key>
        <dict>
        <key>net.sourceforge.MonolingualHelper</key>
        <true/>
        </dict>
        <key>ProgramArguments</key>
        <array>
        <string>/Library/PrivilegedHelperTools/net.sourceforge.MonolingualHelper</strin g>
        </array>
        </dict>
        </plist>
    Contents of /System/Library/Security/authorization.plist
        - mod date: Jan  7 19:31:13 2015
        - checksum: 2720110640
        <?xml version="1.0" encoding="UTF-8"?>
        <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
        <plist version="1.0">
        <dict>
        <key>comment</key>
        <string>The name of the requested right is matched against the keys.  An exact match has priority, otherwise the longest match from the start is used. Note that the right will only match wildcard rules (ending in a ".") during this reduction.
        allow rule: this is always allowed
        &lt;key&gt;com.apple.TestApp.benign&lt;/key&gt;
        &lt;string&gt;allow&lt;/string&gt;
        deny rule: this is always denied
        &lt;key&gt;com.apple.TestApp.dangerous&lt;/key&gt;
        &lt;string&gt;deny&lt;/string&gt;
        user rule: successful authentication as a user in the specified group(5) allows the associated right.
        The shared property specifies whether a credential generated on success is shared with other apps (i.e., those in the same "session"). This property defaults to false if not specified.
        The timeout property specifies the maximum age of a (cached/shared) credential accepted for this rule.
        The allow-root property specifies whether a right should be allowed automatically if the requesting process is running with uid == 0.  This defaults to false if not specified.
        See remaining rules for examples.
        </string>
        <key>rights</key>
        <dict>
        <key></key>
        <dict>
        <key>class</key>
        <string>rule</string>
        <key>comment</key>
        ...and 1850 more line(s)
    Contents of /private/etc/authorization.deprecated
        - mod date: Sep 30 13:39:21 2013
        - checksum: 2773682028
        <?xml version="1.0" encoding="UTF-8"?>
        <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
        <plist version="1.0">
        <dict>
        <key>comment</key>
        <string>The name of the requested right is matched against the keys.  An exact match has priority, otherwise the longest match from the start is used. Note that the right will only match wildcard rules (ending in a ".") during this reduction.
        allow rule: this is always allowed
        &lt;key&gt;com.apple.TestApp.benign&lt;/key&gt;
        &lt;string&gt;allow&lt;/string&gt;
        deny rule: this is always denied
        &lt;key&gt;com.apple.TestApp.dangerous&lt;/key&gt;
        &lt;string&gt;deny&lt;/string&gt;
        user rule: successful authentication as a user in the specified group(5) allows the associated right.
        The shared property specifies whether a credential generated on success is shared with other apps (i.e., those in the same "session"). This property defaults to false if not specified.
        The timeout property specifies the maximum age of a (cached/shared) credential accepted for this rule.
        The allow-root property specifies whether a right should be allowed automatically if the requesting process is running with uid == 0.  This defaults to false if not specified.
        See remaining rules for examples.
        </string>
        <key>rights</key>
        <dict>
        <key></key>
        <dict>
        <key>class</key>
        <string>rule</string>
        <key>comment</key>
        ...and 9729 more line(s)
    Contents of /private/etc/ssh_config
        - mod date: Oct  1 12:06:10 2012
        - checksum: 1281775184
         Host *
           SendEnv LANG LC_*
        Host *
            XAuthLocation /opt/X11/bin/xauth
    Contents of Library/LaunchAgents/com.adobe.ARM.UUID.plist
        - mod date: Aug 21 15:00:01 2010
        - checksum: 2170691092
        <?xml version="1.0" encoding="UTF-8"?>
        <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
        <plist version="1.0">
        <dict>
        <key>Label</key>
        <string>com.adobe.ARM.UUID</string>
        <key>ProgramArguments</key>
        <array>
        <string>/Applications/Adobe Reader 9/Adobe Reader.app/Contents/MacOS/Updater/Adobe Reader Updater Helper.app/Contents/MacOS/Adobe Reader Updater Helper</string>
        </array>
        <key>RunAtLoad</key>
        <true/>
        <key>StartInterval</key>
        <integer>12600</integer>
        </dict>
        </plist>
    Contents of Library/LaunchAgents/com.amazon.cloud-player.plist
        - mod date: Feb 22 10:43:22 2014
        - checksum: 2707474481
        <?xml version="1.0" encoding="UTF-8"?>
        <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
        <plist version="1.0">
        <dict>
        <key>EnableTransactions</key>
        <false/>
        <key>KeepAlive</key>
        <true/>
        <key>Label</key>
        <string>com.amazon.cloud-player</string>
        <key>Program</key>
        <string>/Applications/Amazon Cloud Player.app/Contents/MacOS/Amazon Music Helper</string>
        <key>RunAtLoad</key>
        <true/>
        </dict>
        </plist>
    Contents of Library/LaunchAgents/com.amazon.music.plist
        - mod date: Jan 12 15:51:16 2015
        - checksum: 3668832669
        <?xml version="1.0" encoding="UTF-8"?>
        <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
        <plist version="1.0">
        <dict>
        <key>EnableTransactions</key>
        <false/>
        <key>KeepAlive</key>
        <true/>
        <key>Label</key>
        <string>com.amazon.music</string>
        <key>Program</key>
        <string>/Applications/Amazon Music.app/Contents/MacOS/Amazon Music Helper</string>
        <key>RunAtLoad</key>
        <true/>
        </dict>
        </plist>
    Contents of Library/LaunchAgents/com.apple.FolderActions.folders.plist
        - mod date: Feb 17 09:08:58 2015
        - checksum: 1189540302
        <?xml version="1.0" encoding="UTF-8"?>
        <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
        <plist version="1.0">
        <dict>
        <key>Label</key>
        <string>com.apple.FolderActions.folders</string>
        <key>Program</key>
        <string>/usr/bin/osascript</string>
        <key>ProgramArguments</key>
        <array>
        <string>osascript</string>
        <string>-e</string>
        <string>tell application "Folder Actions Dispatcher" to tick</string>
        </array>
        <key>WatchPaths</key>
        <array/>
        </dict>
        </plist>
    Contents of Library/LaunchAgents/com.apple.SafariBookmarksSyncer.plist
        - mod date: Jul 31 12:13:01 2010
        - checksum: 2859079559
        <?xml version="1.0" encoding="UTF-8"?>
        <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
        <plist version="1.0">
        <dict>
        <key>Label</key>
        <string>com.apple.Safari</string>
        <key>LimitLoadToSessionType</key>
        <string>Aqua</string>
        <key>ProgramArguments</key>
        <array>
        <string>/Applications/Safari.app/Contents/SafariSyncClient.app/Contents/MacOS/S afariSyncClient</string>
        <string>--sync</string>
        <string>com.apple.Safari</string>
        <string>--entitynames</string>
        <string>com.apple.bookmarks.Bookmark,com.apple.bookmarks.Folder</string>
        </array>
        <key>RunAtLoad</key>
        <false/>
        <key>ThrottleInterval</key>
        <integer>60</integer>
        <key>WatchPaths</key>
        <array>
        <string>/Users/USER/Library/Safari/Bookmarks.plist</string>
        </array>
        </dict>
        ...and 1 more line(s)
    Contents of Library/LaunchAgents/com.microsoft.LaunchAgent.SyncServicesAgent.plist
        - mod date: Feb 17 01:22:03 2015

  • EA2: Code is generated for only one column with Domain check constraint.

    I created a Domain with a Value List (Y or N - Yes or No) and used that domain for two columns in the same table. But for only one column (the last one) the check appears in the generated DDL.
    After I enabled the "Use Domain Constraints" both checks appear in the DDL, but one as an inline check constraint and one as an "Alter table add contraint.."
    Once I changed the naming Template for the check constraint, both constraints are generated as an Alter table clause. The inline check constraint is only generated when the name of the constraint (according to the template) is too long. It would be nice if I could choose if I want an inline or a separate check constraint definition.
    Edited by: Roel on Nov 23, 2010 11:55 AM
    Edited by: Roel on Nov 23, 2010 12:02 PM

    I logged ER for that
    Philip

  • Help with the check box.

    Hi,
    I have a question with the Checkbox. I am using Apex 4.0.
    I have 5 checkboxes and using the Lovs I have given values to each check box.
    When I select the checkboxes and submit, the values are inserted into a single column.
    Example
    Consider CB as check box
    CB1 1
    CB2 2
    CB3 3
    CB4 4
    CB5 5
    When I Select CB1, CB4, CB5 In database it stores as 1:4:5 But, I need it to be stored as 10045 format. Like if I select CB2,3 5 then it should be stored as 02305
    The return value of the checkbox should be displayed along with the other unselected values as 0s as told in the above format.
    Can anyone help me with this.
    Thanks,
    Rik

    If you want to show the value on screen(can't set it to the same checkbox item)
    checkbox_item_name = 'P133_CHECK';  //checkbox item name
    checkbox_value_item_name = 'P133_CHECKBOX_VALUE'; // Item which has the checkbox value concatenated 0 for not checked and checkbox value when checked
    $('#'+checkbox_item_name).find('input[type=checkbox]').click( function(){
      var val = '';
      $('#'+checkbox_item_name).find('input[type=checkbox]').each( function(){
        if ( $(this).is(':checked') ){ val+= $(this).val(); }
        else { val+=0; }
      $s(checkbox_value_item_name,val);
    If you want to just use the value in PLSQL, it is much more simpler
    Create a Dynamic Action that is triggered "*before page submit*"
    Execute JS code
    checkbox_item_name = 'P100_CHECK';  //checkbox item name, change it appropriately
    var val = '';
    $('#'+checkbox_item_name).find('input[type=checkbox]').each( function(){
      if ( $(this).is(':checked') ){ val+= $(this).val(); }
      else { val+=0; }
    $s(checkbox_item_name,val);Now when the checkbox submits, the checkbox item would have the concatenated value as required.

  • Help with authority-check

    Hello ppl,
    On my selection screen for a report, I have the field Sales Org. SELECT-OPTIONS: s_vkorg FOR gs_selscr-vkorg 
                                  OBLIGATORY, "Sales Org.
    I need to check whether the user has the authorization for the selected sales organisations. So, I am using:
      AUTHORITY-CHECK OBJECT 'V_VBAK_VKO'
               ID 'VKORG' FIELD s_vkorg
               ID 'ACTVT' FIELD '03'.
      IF sy-subrc NE 0.
        MESSAGE e013.    " No authorization
        SET CURSOR FIELD 'S_VKORG-LOW'.
      ENDIF.
    But, will this code handle a range of sales organisations?
    Also, how will I be able to display an error message displaying the sales org for which the user has no authorization?
    Please help.
    Thanks.

    selection-screen begin of block b1 with frame .
    select-options : so_bukrs for bsid-bukrs obligatory,
    so_kunnr for bsid-kunnr,
    so_hkont for bsid-hkont,
    so_prctr for bsid-prctr ,
    so_ktokd for kna1-ktokd.
    selection-screen end of block b1.
    initialization.
    *Clearing the work area.
    clear gs_bsid.
    Refreshing the internal tables.
    refresh gt_bsid.
    *comm1 = 'Post Dt'.
    *comm2 = 'Doc Dt'.
    *comm3 = 'Bline Dt'.
    *******AUTHORITY-CHECK ***********************************************
    at selection-screen .
    call function 'ZCAGL_COUNTRYCODE'
    exporting
    IM_WERKS =
    IM_SPART =
    IM_PRCTR =
    im_bukrs = so_bukrs-low
    importing
    e_land1 = e_land1.
    if e_land1 ne 'IN'.
    message i004(yfi02) with 'This Company Code' so_bukrs-low
    'doesn''t belong to INDIA'.
    leave program.
    else.
    authority-check object 'ZPRCHK_NEW' :
    id 'BUKRS' field so_bukrs-low.
    if sy-subrc ne 0.
    message e001(yfi02).
    leave program.
    endif.
    endif.
    if so_prctr-low is not initial.
    call function 'ZCAGL_COUNTRYCODE'
    exporting
    IM_WERKS =
    IM_SPART =
    im_prctr = so_prctr-low
    IM_BUKRS =
    importing
    e_land1 = e_land1.
    if e_land1 ne 'IN'.
    message i004(yfi02) with 'This Profit center'
    so_prctr-low 'doesn''t belong to INDIA' .
    leave program.
    else.
    authority-check object 'ZPRCHK_NEW' :
    id 'PRCTR' field so_prctr-low.
    if sy-subrc ne 0.
    message e002(yfi02).
    leave program.
    endif.
    endif.
    endif.
    this will help u....
    Regards
    Anbu

  • Need help with spell checker program

    Hi
    I am writing a spell checker program and need help for a simple logic.I have "List" of correctly spelled words and a String array of wrong spelled words.How can I compare both and tell that for eg xyz word is not spelled correctly.

    BigDaddyLoveHandles wrote:
    To learn more about Map, take the collection tutorial: [http://java.sun.com/docs/books/tutorial/collections/index.html]
    (Actually, to me it sounds like you have a Set of correctly spelled words and another Set of words which may or may not be correctly spelled, and you want the difference...)That is what it sounds like to me also, and that is easy.
    JSG

  • Help with constraints on object relational tables

    Hi
    I am looking to create an object relational database with a check constraint on the relationships. For example:
    * I have table called person_tab which is a table of person_t type.
    * Person_t type is inherited by the manager_t type and the applicant_t type.
    * I have a second table called interview_tab of interview_t type.
    * The interview table has two columns (manager and appilcant) that are scope restrained to the person table.
    * I would also like to put check constraints on these columns to say:
    ----- Manager: check the person_number is less than 20000
    ----- Applicant: check the person_number is greater than 19999
    Can anyone tell me if this is possible and if so how can it be done?
    Thanks in advance
    Stephen

    You have circular dependencies (manager_t depends upon interview_list_t depends upon interview_t depends upon manager_t) which I don't think is a good idea. But then that's probably just my old-fashioned relational head baulking at this new-fangled OO way of looking at data models. However, my experience with using types and subtypes in Oracle does teach me that this is a complete pain in the neck, because it makes changing your Type definitions a very awkward process.
    am I right in saying I cannot use the check constraint?I think so. If the value range for ID is a property of being a Manager or an Applicant then properly that should be enforced by those types not by the Interview type. Then all that Interviews needs to worry about is that it gets instantiated with attributes of the correct Type.
    I've simplified your model a bit. To start with I'm going to create a single PERSONS table to store both managers and applicants...
    SQL> CREATE TYPE person_t AS OBJECT (
      2  personno NUMBER,
      3  surname VARCHAR2(30),
      4  forename VARCHAR2(30),
      5  dob DATE
      6  ) NOT FINAL;
      7  /
    Type created.
    SQL>
    SQL> CREATE OR REPLACE TYPE applicant_t UNDER person_t
      2  (qualifications varchar2(200))
      3  FINAL ;
      4  /
    Type created.
    SQL>
    SQL> CREATE OR REPLACE TYPE manager_t UNDER person_t
      2  (extension varchar2(5)) FINAL;
      3  /
    Type created.
    SQL>
    SQL> CREATE OR REPLACE TYPE interview_t AS OBJECT (
      2  interviewno NUMBER,
      3  idate DATE,
      4  itime NUMBER,
      5  interest NUMBER,
      6  is_made_by REF manager_t,
      7  attended_by REF applicant_t
      8  ) ;
      9  /
    Type created.
    SQL>
    SQL>
    SQL> CREATE TABLE persons OF person_t
      2  /
    Table created.
    SQL> CREATE TABLE interviews OF interview_t
      2  /
    Table created.
    SQL> Okay let's create some objects...
    SQL> declare
      2     mgr manager_t := manager_t(1,'RUNCITER', 'GLEN', sysdate - (42*365), 'x1234');
      3     app applicant_t := applicant_t(2,  'CHIP', 'JOE', sysdate - (38*365), 'BSc, MSc');
      4     intv interview_t;
      5     m_ref REF  person_t;
      6     a_ref REF person_t;
      7  begin
      8     INSERT INTO persons p VALUES mgr
      9         RETURNING REF(p) INTO m_ref   ;
    10     INSERT INTO persons p VALUES app
    11         RETURNING REF(p) INTO a_ref   ;
    12     insert into interviews
    13     values (interview_t(1001, sysdate, 45, 5, TREAT(m_ref AS REF manager_t)
            , TREAT(a_ref AS REF applicant_t)));
    14  end;
    15  /
    PL/SQL procedure successfully completed.
    SQL> SELECT i.interviewno, i.is_made_by.surname, i.attended_by.surname
      2  FROM interviews i
      3  /
    INTERVIEWNO IS_MADE_BY.SURNAME             ATTENDED_BY.SURNAME                 
           1001 RUNCITER                       CHIP                                
    SQL> Have we got integrity?
    SQL> rollback
      2  /
    Rollback complete.
    SQL>
    SQL> declare
      2     mgr manager_t := manager_t(1,'RUNCITER', 'GLEN', sysdate - (42*365), 'x1234');
      3     app applicant_t := applicant_t(2,  'CHIP', 'JOE', sysdate - (38*365), 'BSc, MSc');
      4     intv interview_t;
      5     m_ref REF  person_t;
      6     a_ref REF person_t;
      7  begin
      8     INSERT INTO persons p VALUES mgr
      9         RETURNING REF(p) INTO m_ref   ;
    10     INSERT INTO persons p VALUES app
    11         RETURNING REF(p) INTO a_ref   ;
    12     insert into interviews
    13     values (interview_t(1001, sysdate, 45, 5, TREAT(a_ref AS REF manager_t)
             , TREAT(m_ref AS REF applicant_t)));
    14  end;
    15  /
    PL/SQL procedure successfully completed.
    SQL>
    SQL> SELECT i.interviewno, i.is_made_by.surname, i.attended_by.surname
      2  FROM interviews i
      3  /
    INTERVIEWNO IS_MADE_BY.SURNAME             ATTENDED_BY.SURNAME                 
           1001                                                                    
    SQL> Kind of, but it's not very satisfactory. Let's use separate tables for MANAGERS and APPLICANTS...
    SQL> rollback
      2  /
    Rollback complete.
    SQL>
    SQL> CREATE TABLE managers OF manager_t
      2  /
    Table created.
    SQL>
    SQL> CREATE TABLE applicants OF applicant_t
      2  /
    Table created.
    SQL> declare
      2     mgr manager_t := manager_t(1,'RUNCITER', 'GLEN', sysdate - (42*365), 'x1234');
      3     app applicant_t := applicant_t(2,  'CHIP', 'JOE', sysdate - (38*365), 'BSc, MSc');
      4     intv interview_t;
      5     m_ref REF  manager_t;
      6     a_ref REF applicant_t;
      7  begin
      8     INSERT INTO managers m VALUES mgr
      9         RETURNING REF(m) INTO m_ref   ;
    10     INSERT INTO applicants a VALUES app
    11         RETURNING REF(a) INTO a_ref   ;
    12     insert into interviews values (interview_t(1001, sysdate, 45, 5, m_ref, a_ref));
    13 
    14  end;
    15  /
    PL/SQL procedure successfully completed.
    SQL>
    SQL> SELECT i.interviewno, i.is_made_by.surname, i.attended_by.surname
      2  FROM interviews i
      3  /
    INTERVIEWNO IS_MADE_BY.SURNAME             ATTENDED_BY.SURNAME                 
           1001 RUNCITER                       CHIP                                
    SQL> rollback
      2  /
    Rollback complete.
    SQL> declare
      2     mgr manager_t := manager_t(1,'RUNCITER', 'GLEN', sysdate - (42*365), 'x1234');
      3     app applicant_t := applicant_t(2,  'CHIP', 'JOE', sysdate - (38*365), 'BSc, MSc');
      4     intv interview_t;
      5     m_ref REF  manager_t;
      6     a_ref REF applicant_t;
      7  begin
      8     INSERT INTO managers m VALUES mgr
      9         RETURNING REF(m) INTO m_ref   ;
    10     INSERT INTO applicants a VALUES app
    11         RETURNING REF(a) INTO a_ref   ;
    12     insert into interviews values (interview_t(1001, sysdate, 45, 5, a_ref, m_ref));
    13 
    14  end;
    15  /
       insert into interviews values (interview_t(1001, sysdate, 45, 5, a_ref, m_ref));
    ERROR at line 12:
    ORA-06550: line 12, column 69:
    PL/SQL: ORA-00932: inconsistent datatypes: expected REF APC.APPLICANT_T got REF
    APC.MANAGER_T
    ORA-06550: line 12, column 4:
    PL/SQL: SQL Statement ignored
    SQL>I hope that's useful to you.
    Cheers, APC
    Layout of SQL*Plus session tweaked for readability
    Message was edited by:
    APC

  • 10g R2 NVARCHAR2 check constraint problems

    Hi, Thanks for taking a look...
    I've just installed 10g R2 on Solaris 10 and run into a small problem with NVARCHAR2s.
    I have a table with a check constraint to make sure the column is a valid value on an nvarchar2 column. Querying the table for a specific value results in no data found, however the data appears to be intact.
    The database NLS_CHARACTERSET is AL32UTF8 and NLS_NCHAR_CHARACTERSET is AL16UTF16.
    I think the following script results can show the problem better than I can explain it.
    Any suggestions would be appreciated. Thanks.
    Mike
    SQL*Plus: Release 10.2.0.1.0 - Production on Mon Apr 17 13:51:40 2006
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
    With the Partitioning and Data Mining options
    SQL> @problem_script.sql
    SQL> create table foo (
    2 bar nvarchar2(10) constraint ck_bar check (bar in ('abc','def'))
    3 );
    Table created.
    SQL> insert into foo values ('abc');
    1 row created.
    SQL> commit;
    Commit complete.
    SQL>
    SQL> REM Strange. This worked in every version prior to 10g R2.
    SQL> REM Why doesn't it work now?
    SQL>
    SQL> select * from foo where bar = 'abc';
    no rows selected
    SQL>
    SQL> REM Even more strange is why this doesn't work:
    SQL>
    SQL> select * from foo where bar = N'abc';
    no rows selected
    SQL>
    SQL> REM Stranger still are these two queries:
    SQL>
    SQL> select bar, decode(bar, 'abc', 'It matches', 'No it doesnt')
    2 from foo;
    BAR DECODE(BAR,'A
    abc It matches
    SQL>
    SQL> REM This is still strange, but not unexpected given the prior query
    SQL>
    SQL> select bar, decode(bar, 'abc', 'It matches', 'No it doesnt')
    2 from foo
    3 where bar = 'abc';
    no rows selected
    SQL>
    SQL> REM Strangest of all is why this DOES work:
    SQL>
    SQL> alter table foo disable constraint ck_bar;
    Table altered.
    SQL> select * from foo where bar = 'abc';
    BAR
    abc
    SQL>
    SQL>
    SQL> REM Regular varchars are unchanged...
    SQL>
    SQL> create table bar (
    2 foo varchar2(10) constraint ck_foo check (foo in ('abc','def'))
    3 );
    Table created.
    SQL> insert into bar values ('abc');
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> select * from bar where foo = 'abc';
    FOO
    abc

    Nope.
    SQL> select * from foo where bar = TO_NCHAR('abc');
    no rows selected
    Of all the things I've tried (and I think I've tried just about everything), only the TO_CHAR(bar) and disabling the check constraint work. The fact that DECODE(bar, 'abc', 'true', 'false') in the select list is also confusing since it's converted there correctly, but not in the WHERE clause. And why does it work as epxected when the constraint is disabled?
    My thoughts are that it can't be an Oracle bug, otherwise I'm sure I wouldn't be the first to find it. I've built the instance using the same configuration script I used for the 10g R1 database that works, so the configuration parametes are the same.
    More things that don't make sense:
    SQL> select dump(bar), dump('abc') from foo;
    DUMP(BAR)
    DUMP('ABC')
    Typ=1 Len=6: 0,97,0,98,0,99
    Typ=96 Len=3: 97,98,99
    SQL> select dump(bar), dump(to_nchar('abc')) from foo;
    DUMP(BAR)
    DUMP(TO_NCHAR('ABC'))
    Typ=1 Len=6: 0,97,0,98,0,99
    Typ=1 Len=6: 0,97,0,98,0,99
    Thanks for your help though...
    Mike

  • Complicated check constraint?

    Hi y'all,
    I need to set up a table, in which I have two specific columns, which can only be null AT THE SAME TIME. When one is not null, also another one must not be. Is it possible to set it up with a check constraint? Or do I have to set up a trigger? Thx for any help.

    It's a table-level check constraint, and not a very complicated one at that:
    (c1 is not null and c2 is not null) or (c1 is null and c2 is null)

  • How to add a check constraint to a column to accept values in the following format: "L214"?

    All I could come up with is this:
    check (column_name like '____');
    But That doesn't enforce the first character to be a letter and the other three to be numbers.

    Hi,
    "PS: Why the f***you have so many subforums here?"
    Because it is much easier to seperate and let experts answer to specific details of SQL Server. SQL Server is not a small product as many people think ;-)
    Here is the solution:
    CREATe table SampleA (A INT, B VARCHAR(MAX) CHECK (B LIKE '[A-Z][0-9][0-9][0-9]'))
    INSERT INTO SampleA VALUES (1,'0000')
    Msg 547, Level 16, State 0, Line 2
    The INSERT statement conflicted with the CHECK constraint "CK__SampleA__B__38B96646". The conflict occurred in database "master", table "dbo.SampleA", column 'B'.
    The statement has been terminated.
    INSERT INTO SampleA VALUES (1,'L000')
    --(1 row(s) affected)
    INSERT INTO SampleA VALUES (1,'L0001')
    Msg 547, Level 16, State 0, Line 2
    The INSERT statement conflicted with the CHECK constraint "CK__SampleA__B__38B96646". The conflict occurred in database "master", table "dbo.SampleA", column 'B'.
    The statement has been terminated.
    -Jens
    Jens K. Suessmeyer http://blogs.msdn.com/Jenss

  • Tabular Form Validation: Comparing Two Columns vs Check Constraint

    What is the best approach for validating that one column needs to be greater than another column in a tabular form when attempting to save. (E.g. An effective date and expirey date column. The expirey date column >= effective date column)
    At the moment I have a check constraint on the two columns at the database level which is fine but it returns and passes up a pretty cryptic (from a business user perspective) unfriendly message to the user as follows:
    Error in mru internal routine: ORA-20001: Error in MRU: row= 1, ORA-02290: check constraint (IDMTC.ADDRESS_TYPE_CON) violated, update "IDMTC"."ADDRESS_TYPE" set "ID" = :b1, "CODE" = :b2, "NAME" = :b3, "LOV_SORT_ORDER" = :b4, "DESCRIPTION" = :b5, "EFFECTIVE_DATE" = :b6, "EXPIRY_DATE" = :b7 where "ID" = :p_pk_col
    Unable to process update.
    Is there a way to inject, detect and/or replace this with a friendlier business user message? I have confirmed that the "Unable to process update." text at the bottom below the MRU Internal routine error raised from my check constraint is the process error message for my Apply MRU process.
    I was hesitating going down a larger page level validation where I loop through the tabular form array and/or inject some client side Javascript.
    Any advice? Have I simply overlooked some tabular form options for validating using cross column values?
    Thanks,
    Jeff

    Jeff..Thanks for the response.
    However because I am working in a tabular form at design time I don't know which controls I can reference in a dynamic action, or custom Javascript routine other than selecting all elements in a column using JQuery, etc.
    I have decided to go with for the time being an approach I found here: doing validation on tabular form
    My code ended up looking something like and was entered into a page level validation as a PL/SQL function body returning error text.:
    DECLARE
    l_error VARCHAR2 (4000);
    BEGIN
    FOR i IN 1 .. apex_application.g_f02.COUNT
    LOOP
    --If Expiry date is older then effective date
    IF nvl(apex_application.g_f08 (i), to_date('31-DEC-9999', 'dd-mon-yyyy')) < apex_application.g_f07 (i) THEN
    l_error :=
    l_error
    || '</br>'
    || 'Row '
    || i
    || ': Expiry date must be greater than effective date '
    || ' for maintenance item name: '
    || apex_application.g_f03 (i);
    END IF;
    END LOOP;
    RETURN LTRIM (l_error, '</br>');
    END;
    I had been hoping with Apex 4+ that there was additional native functionality to do this type of validation or somehow be able to reference a column or control name instead of a generic array column so that my code was better self documenting.
    It works for now...but would love to revisit with maybe a cleaner client side solution that does the validation and highlights the invalid element since I still maintain data integrity at the db with the check constraint.
    Thanks,
    Jeff

  • Peculiar problem in oracle 10g  on AIX 5.3.0 With Check constraints

    Hi Every One,
    I am facing peculiar problem in oracle 10.2.0.1.0,AIX 5.3.0. I created table with check constraints like this
    create table test1 (name nvarchar2(1),check (name in('Y','N')));
    SQL> create table test1 (name nvarchar2(1),check (name in('Y','N')));
    Table created.
    SQL> insert into test1 values ('Y');
    1 row created.
    SQL> COMMIT;
    SQL> select from test1 where name = 'Y';* Why this statement is n't working
    no rows selected
    SQL> select * from test1;
    N
    Y
    ANOTHER INTERSTING ONE IS
    SQL> select * from test1 where name in('Y'); Why this statement is n't working
    no rows selected
    SQL> select * from test1 where name in('Y','Y'); it's working
    N
    Y
    SQL> select * from test1 where name in('','Y'); it's working
    N
    Y
    SQL> select * from test1 where name in('7','Y'); it's working
    N
    Y
    Like
    SQL> select * from test1 where name like 'Y'; it's not working
    no rows selected
    I created a table without check constraints
    SQL> create table test2 (name nvarchar2(1));
    Table created.
    SQL> insert into test2 values ('Y');
    1 row created.
    SQL> select * from test2;
    N
    Y
    SQL> select * from test2 where name ='Y'; it's working
    N
    Y
    SQL> select * from test2 where name like 'Y'; it's working
    N
    Y
    Database Details
    NLS_LANGUAGE AMERICAN
    NLS_TERRITORY AMERICA
    NLS_CURRENCY $
    NLS_ISO_CURRENCY AMERICA
    NLS_NUMERIC_CHARACTERS .,
    NLS_CHARACTERSET WE8MSWIN1252
    NLS_CALENDAR GREGORIAN
    NLS_DATE_FORMAT DD-MON-RR
    NLS_DATE_LANGUAGE AMERICAN
    NLS_SORT BINARY
    NLS_TIME_FORMAT HH.MI.SSXFF AM
    PARAMETER VALUE
    NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
    NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
    NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
    NLS_DUAL_CURRENCY $
    NLS_COMP BINARY
    NLS_LENGTH_SEMANTICS BYTE
    NLS_NCHAR_CONV_EXCP FALSE
    NLS_NCHAR_CHARACTERSET AL16UTF16
    NLS_RDBMS_VERSION 10.2.0.1.0
    Why it's happening. Whehter check constraint is valid or not in Equallity operator and like and in .
    Whereever we using single character column with check constraint,it's working with Equality operator and like and in.
    IT'S WORKING FINE WITHOUT CHECK CONSTRAINTS.WE HAVE TWO AIX MACHINES WITH ORACLE10G.THE SAME PROBLEM OCCURING IN TWO MACHINES
    PLEASE HELP ME .
    THANK YOU,
    WITH REGARDS,
    N.VINODH

    h
    Edited by: user3266490 on Dec 3, 2008 2:30 AM

  • Problem with check constraint in mysql

    I am using mysql v8.14 and I have a problem on CHECK which is given below. I want to insert just 'friends' and 'all' on privacy attribute
    but mysql inserts everything.
    Can anyone help me, please? Thanks
    CREATE TABLE `customer`
    `cid` NUMERIC(6),
    `cname` VARCHAR(25),
    `password` VARCHAR(6),
    `email` VARCHAR(25),
    `phone` NUMERIC(12),
    `privacy` VARCHAR(10),
    PRIMARY KEY (`cid`),
    CHECK (`privacy`= `friends` OR `privacy`= `all`)
    );

    I am not familiar with MySQL syntax, but I would offer this observation:
    In your definition of the check constraint:
    CHECK (`privacy`= `friends` OR `privacy`= `all`)you are using the same delimiters (`) around both your column names and your literals. Is that correct?
    i.e. in Oracle I would use
    CHECK(privacy = 'friends' OR privacy = 'all')because privacy is not a literal, it is a column name.
    Is your syntax correct?

  • Regexp_like with check constraint

    Hi all,
    My requirement is User should not enter the data like ( ½, ¼,...).
    I have created table with check constraint with the following syntax:
    CREATE TABLE mytest (c1 VARCHAR2(20),
    CHECK (REGEXP_LIKE(c1,'^[[:alnum:]+[:digit:]+[!@#]]+$')));
    The above means, except alphanumeric, digits, and keyboard characters should allow. But it is not allowing any characters.
    Please help me, any mistake in the above syntax.
    Thanks
    Mano

    Hi, Mano,
    user533671 wrote:
    Hi all,
    My requirement is User should not enter the data like ( ½, ¼,...).
    I have created table with check constraint with the following syntax:That's a couple of examples of values that are not allowed. Now give some examples of values that are allowed, and the reasons why each are allowe or not.
    For example, is 'GREEN/BLUE', with a slash between letters, allowed? How about '1/' with no number after the slash?
    >
    CREATE TABLE mytest (c1 VARCHAR2(20),
    CHECK (REGEXP_LIKE(c1,'^[[:alnum:]+[:digit:]+[!@#]]+$')));
    The above means, except alphanumeric, digits, and keyboard characters should allow. But it is not allowing any characters.
    Please help me, any mistake in the above syntax.You're using square brackets inside square brackets. If you really need to do that, then the right ']' must be the first character listed.
    Post 5 or 10 INSERT statements. Tell which INSERTs should work, and which ones should fail because of the CHECK constraint, and explain why in each case.

  • Help with creating a form, I want to add a check box to enable me to unlock certain fields and deselect the block again

    Help with creating a form, I want to add a check box to enable me to unlock certain fields and deselect the block again

    Look to the right under "More Like This". Your issue has been discussed many many times. The error you are seeing is because you do not have enough free "contiguous" space on your hard drive. Read the other threads that address this issue to find how to solve the issue.
    Or, put "The disk cannot be partitioned because some files cannot be moved" into the search box at the upper right of this page.

Maybe you are looking for

  • GR/IR Account assingment

    Hi In GR/IR automatic account assingment, we have to enter 3 accounts 1. Reconcilitation acc 2. Adjustmet acc 3. Target acc What are these accounts means please explain in deteails in accounting terms? Thank you.

  • Cannot resize text boxes or shapes

    I have done something, somehow and can't figure it out. When I draw a text box or a shape I am unable to resize with my marquis tool. I have to use the transform tool or the group marquis to grab individual points. I was able to before but must have

  • Update failed when adding email

    Hi please can someone help me. I have a curve 9320 and had my work emails and hot mail on my phone. My work emails stopped coming through and after attempting to fix the issue, I deleted my work emails from my phone. When I try to add the work email

  • Release strategyu for contracts and purchase order

    Hi, My client want both contracts and release orders (purchase order created w.r.t contract) must to go to release approval before procuring the material or service. Is it possible to configure seperate release strategies for contact and purchase ord

  • Upgrading to Snow Leopard...

    Hey All, Am thinking of upgrading to Snow Leopard, I skipped Leopard, was wondering if the 29$ version of Snow leopard would work to upgrade from Tiger. I'd do a clean install, reformat the old drive and everything.. Am only asking coz I want to test