Write a procedure to check the count is less than 1300 for every 3 hours
Good Morning all,
I want to write a procedure to check the count is less than 1300 for every 3 hours
Query:*
Select count(*) from sample where trx_date=sysdate;
I want to run this query every 3 hours daily
If the count is less than 1300 every 3 hours, we should sent a reminder mail like 'Data not copy'.
Please help me how to write a procedure.
hi there
first
--define the SMTP_OUT_SERVER parameter in your init.ora initialization file
--ALTER SYSTEM SET smtp_out_server='my.domain.com' SCOPE=SPFILE;
after that create a procedure
CREATE OR REPLACE procedure SCOTT.hrsmail
is
v_count number;
begin
Select count(*) into v_count from emp;
if v_count < 1300
then
UTL_MAIL.send(sender => '[email protected]',
recipients => '[email protected]',
cc => '[email protected]',
bcc => '[email protected]',
subject => 'Testing the UTL_MAIL Package',
message => 'If you get this, UTL_MAIL package
else
null; --what you want to do here
end if ;
end;
/we should create a job which run after every 3 hrs and send a reminder mail like 'Data not copy'.
BEGIN
SYS.DBMS_JOB.REMOVE(373);
COMMIT;
END;
DECLARE
X NUMBER;
BEGIN
SYS.DBMS_JOB.SUBMIT
( job => X
,what => 'begin hrsmail; end;'
,next_date => to_date('14/02/2011 18:39:29','dd/mm/yyyy hh24:mi:ss')
,interval => 'SYSDATE+3/24 '
,no_parse => FALSE
SYS.DBMS_OUTPUT.PUT_LINE('Job Number is: ' || to_char(x));
COMMIT;
END;
/hope this will help you
Regards
Hitesh
Edited by: Hitesh Nirkhey on Feb 14, 2011 3:34 PM
Similar Messages
-
HT5878 how to check the detail of font being used for reading the file received by an email
I received word file as an attachment with email on my iphone. I want to check the detail on font being used for reading the word file received as attachment in an email.
ThanksYou don't need to copy the cert out of your configuration. OpenSSL has an "s_client" subcommand which can open an SSL connection and verify the cert for you. It even knows how to do STARTTLS. Something like this ought to do it:
openssl s_client -starttls smtp -CAfile /path/to/ca/file -connect your.ironport:25
The /path/to/ca/file is necessary to provide openssl with a cache of root CA certs. You could use -CApath instead of -CAfile if you have a hashed directory of root CA certs instead of a single file containing them all.
You can also point this at your partner's SMTP server as well. -
How to start checking the bottle necks in PL/SQL for benchmarking?
How to start checking the bottle necks in PL/SQL for benchmarking? Can anbody post me the instructions to start tuning the Oracle PL/SQL code..
Thanks & Regards,
VJyou can use DBMS_PROFILER to do this. This built in package is very well documented:
http://www.oracle.com/pls/db102/ranked?word=dbms_profiler&remark=federated_search
Depending on your IDE, you could get a visual representation of the profile. Something like:
http://technology.amis.nl/blog/2327/dbms_profiler-report-for-sql-developer -
When I try to FaceTime on my ipad it says face time failed please check the number but it says this on every number and I know thier correct
Read this
http://support.apple.com/kb/TS5419
As of april 16 every device that uses facetime must be updated to acertain level or it won't work. And the 'catch' is that it applies to your device and the person you're calling. -
My apple TV has worked flawlessly since Xmas 2011. Now when I download a new movie, it tells me the movie won't be ready for 6 hours. I haven't changed my internet hardware or provider, or speed. Can anyone help?
Winston is right. If it seems OK though, I would also add that you should make sure to check it at the same day and time you have tried to download the movie. I had the same thing happen to me and it turned out my speed was fine much of the time but was dropping to like a few hundred kbps from about 7-11 evenings (typically when we were trying to order a movie).
Steve -
The latest update has been running for 16 hours. Is that normal.
The small window has been showing for 16 hours. It says downloading the update, and connecting to the server and it has the bar running across. How don I know when it is complete.
Not normal. You probably got a bad connection, but the update is not what you want. You are so far behind at Firefox 3.6.10 that even if the update worked you would still probably have to do more updates. With Mac OS X 10.4 you cannot go to Firefox 4.0, but you will want to go to the latest 3.6 version which is 3.6.17
Start at http://www.mozilla.com/firefox/all-older.html ''(those with current systems can upgrade to 4.0.1 at http://www.mozilla.com for 4.0.1)''. At the completion of the download don't let the setup start Firefox for you, when the setup ends, start Firefox in your normal manner this way you will be less likely to create a new profile.
The extra startup pages are temporary -- read them. The next time Firefox comes up you should be back to starting with your normal home page.
Note: Firefox must be down once the install starts.
Close Firefox with File>Exit. Then make sure Firefox is not running --
On Windows: check the "Processes" tab in the Windows Task Manager.
On Mac: Firefox > Quit then Command+option+Esc, if Firefox running use Force quit
Permission errors on Mac:
If you were getting permission errors on a Mac, download the latest
Firefox version (for your system), then uninstall and reinstall Firefox. Do not remove your profile directories and files as they contain your settings,
bookmarks, history, extensions, passwords, and cookies. -
my imac (intel core i5, OS 10.10.1) shuts down every night and will not "wake up" next morning -- it never used to do that -- if I hold down the start button more than twice for many seconds, then it will finally boot up and works fine all day – I’ve tried shutting it down and unplugging it, and that does not work -- I’ve run disk utilities checked permissions, and run anti-virus and get no adverse results – I cannot figure out what is different that causes this problem
From previous experience 3 indicates a shutdown initiated by the SMC (System Management Controller) — hardware responsible for many low-level functions including power, sleep, lights, and fan activity.
Try resetting it:
Power or other problems related to unexpected system sleep, shutdown, lights or fans call for an SMC reset. Read all the steps.
Before Resetting the SMC
Try each of the following steps in this order before you reset the SMC. Test the issue after completing each troubleshooting step to determine if the issue still occurs.
Press Command + Option + Escape to force quit any application that is not responding.
Put your Mac to sleep by choosing the Apple () menu from the upper-left menu bar and then choosing Sleep. Wake the computer after it has gone to sleep.
Restart your Mac by choosing the Apple () menu from the upper-left menu bar and then choosing Restart.
Shut down your Mac by choosing the Apple () menu from the upper-left menu bar and then choosing Shut Down.
Resetting the SMC for Mac Pro, Intel-based iMac, Intel-based Mac mini, or Intel-based Xserve
Shut down the computer.
Unplug the computer's power cord.
Wait fifteen seconds.
Attach the computer's power cord.
Wait five seconds, then press the power button to turn on the computer. -
Now it's stuck with the progress bar less than a quarter full. I have also tried resetting through itunes which works right up to the point where itunes states that it needs the passcode to be inputted into the ipad to connect to it. At which point it then sticks at the same progress bar point. HELP!! please, this ipad is really important to my work.
Well the term "hotlined" I have never heard before. In any case many states (like NY) just passed regulatory powers to the State Public Service Commission of which it may be called something different in your state. You could file a complaint with them. Or file a complaint with your state attorney generals office, they also take on wireless providers.
The problem here is the staff you speak to are poorly trained, in days gone by it took one call to them and they pulled up your account and see the error and had the authority to remove any errors. They did not remove legitimate account actions, but used their heads instead of putting a customer off or worse lying to the customer.
Its a shame you have to go through what you going through.
Good Luck -
Seagate FreeAgent Go is making a clicking sound and the light is rapidly blinking. My Macbook is no longer recognizing it. Is there any way to pull all the songs I have saved on it? The SeaAgent is less than a month old!
Does anyone know how to fix this issue?
Or at least recover the lost data?
Thanks!How to fix: the drive is in warranty, so contact Seagate for a replacement.
How to recover your data: Do you have backups? (If not, you really, really, should.)
You can try downloading Data Rescue, which will run in trial mode and let you know if the data is recoverable. (You can then choose to purchase the full version if it works for you.) A clicking drive, though, is usually (though not always) a sign that the drive cannot be recovered.
Matt
Edit: fixed link. -
My ipad 2's battery percentage is stuck at 95%!!! Eventhough I charge 5 hours, it is still 95%...After that, I unplugged the charger, I use my ipad for 3 hours, it is still 95%!!!!! What's wrong is it?! HELP ME
You probably need to recalibrate the battery. See link below.
Try this first - Reset the iPad by holding down on the Sleep and Home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons. (This is equivalent to rebooting your computer.)
The quickest way (and really the only way) to charge your iPad is with the included 10W or 12W (5W on Mini) USB Power Adapter. iPad will also charge, although more slowly, when attached to a computer with a high-power USB port (many recent Mac computers) or with an iPhone Power Adapter (5W). When attached to a computer via a standard USB port (2.5W, most PCs or older Mac computers) iPad will charge very slowly (but iPad indicates not charging). Make sure your computer is on while charging iPad via USB. If iPad is connected to a computer that’s turned off or is in sleep or standby mode, the iPad battery will continue to drain.
Apple recommends that once a month you let the iPad fully discharge & then recharge to 100%.
How to Calibrate Your Mac, iPhone, or iPad Battery
http://www.macblend.com/how-to-calibrate-your-mac-iphone-or-ipad-battery/
At this link http://www.tomshardware.com/reviews/galaxy-tab-android-tablet,3014-11.html , tests show that the iPad 2 battery (25 watt-hours) will charge to 90% in 3 hours 1 minute. It will charge to 100% in 4 hours 2 minutes. The new iPad has a larger capacity battery (42 watt-hours), so using the 10W charger will obviously take longer. If you are using your iPad while charging, it will take even longer. It's best to turn your new iPad OFF and charge over night. Also look at The iPad's charging challenge explained http://www.macworld.com/article/1150356/ipadcharging.html
Also, if you have a 3rd generation iPad, look at
Apple: iPad Battery Nothing to Get Charged Up About
http://allthingsd.com/20120327/apple-ipad-battery-nothing-to-get-charged-up-abou t/
Apple Explains New iPad's Continued Charging Beyond 100% Battery Level
http://www.macrumors.com/2012/03/27/apple-explains-new-ipads-continued-charging- beyond-100-battery-level/
New iPad Takes Much Longer to Charge Than iPad 2
http://www.iphonehacks.com/2012/03/new-ipad-takes-much-longer-to-charge-than-ipa d-2.html
Apple Batteries - iPad http://www.apple.com/batteries/ipad.html
iPhone: Hardware troubleshooting (Power/Battery section also applies to iPad)
http://support.apple.com/kb/TS2802
Extend iPad Battery Life (Look at pjl123 comment)
https://discussions.apple.com/thread/3921324?tstart=30
iOS 7 Battery Life Draining Too Fast? It’s Easy to Fix
http://osxdaily.com/2013/09/19/ios-7-battery-life-fix/
New iPad Slow to Recharge, Barely Charges During Use
http://www.pcworld.com/article/252326/new_ipad_slow_to_recharge_barely_charges_d uring_use.html
iPad: Charging the battery
http://support.apple.com/kb/HT4060
Best Practices for iPad Battery Charging
http://www.ilounge.com/index.php/articles/comments/best-practices-for-ipad-batte ry-charging/
Tips About Charging for New iPad 3
http://goodscool-electronics.blogspot.com/2012/04/tips-about-charging-for-new-ip ad-3.html
How to Save and Prolong the battery life of your new ipad
https://discussions.apple.com/thread/4480944?tstart=0
Prolong battery lifespan for iPad / iPad 2 / iPad 3: charging tips
http://thehowto.wikidot.com/prolong-battery-lifespan-for-ipad
iPhone, iPod, Using the iPad Charger
http://support.apple.com/kb/HT4327
Install and use Battery Doctor HD
http://itunes.apple.com/tw/app/battery-doctor-hd/id459702901?mt=8
To Extend a Device’s Battery Life, Get to Know It Better
http://tinyurl.com/b67c7xz
iPad Battery Replacement
http://www.apple.com/batteries/replacements.html
In rare instances when using the Camera Connection Kit, you may notice that iPad does not charge after using the Camera Connection Kit. Disconnecting and reconnecting the iPad from the charger will resolve this issue.
Cheers, Tom -
Why does the Iphone4 freeze up after downloading the IOS7.6 patch showing an ITUNE icon? The phone will not change screens for 4 hours.
I Turn it off/on and nothing changes.Hello bigboza,
Thank you for using Apple Support Communities.
For more information, take a look at:
iOS: Not responding or does not turn on
http://support.apple.com/kb/ts3281
If the device remains unresponsive or does not turn on (or power on), reset your device.
If there is no video or if the screen remains black, verify that the device has enough charge to turn on:
If you are using an iPad, ensure that it's connected to the USB Power Adapter supplied with the device.
Let it charge for at least twenty minutes, then see if it starts normally.
If there is no image on the screen, press the Sleep/Wake button to attempt to wake the device.
If the screen displays a red battery icon, continue charging the device until the battery is fully charged. Learn more about charging iPhone and iPod touch, or iPad.
If the above steps do not resolve the issue, or the if the screen remains black or shows a persistent Apple logo, try restoring with iTunes:
Connect the device to your computer and open iTunes.
If the device appears in iTunes, select and click Restore on the Summary pane. Learn more aboutrestoring iOS software.
Have a nice day,
Mario -
Maverick has been completing the update with less than one minute remaining now for well over an hour. Where do I go from here?
try this
Reboot device by pressing both the home button and sleep/wake (power) buttons at the same time for 10-15 seconds until the apple logo appears on the screen, then let go.
if that doesn't work then connect to a computer and try to open the device in itunes -
Trying to download Mountain Lion, I have 2 accounts, both with less than $20 for the new App. Together they add up to $20. Can I merge account totals?
I have now spoken to Apple about my problem and they told me to explain the situation to my Broadband service provider British Telecom (BT).
For reasons not explained, BT suggested the problem lies with the Router hardware they have supplied (BT Business Hub - 2701HGV). Although it is relatively new there is something that prevents it from downloading Mountain Lion???
They are posting me a new one which will not arrive for 2 days. I will let you know if the new router solves this issue. -
Time Machine on Macbook Pro and iMac both running 10.7.4 don't react the same. Macbook Pro runs back every hour even if asleep, and iMac only when it's awake. Why?
I thought the backup whilst asleep was only used on Mountain Lion.. but perhaps it was also introduced with Lion.. anyway it is only enabled on later firmware.. in latest laptops.
http://reviews.cnet.com/8301-13727_7-57480490-263/mountain-lions-powernap-featur e-requires-firmware-update/
A quick google finds all sorts of info.. remember google is your friend. -
purchased a download copy of Acrobat Pro XI for Mac from an online reseller for $199.00. Now I am suspicious that the reseller is less than trustworthy. Could I purchase a copy from Adobe without losing the $199 that I already spent?
I doubt it. The clue should be the price. Any time you see a copy available for less than from Adobe, I would be suspicious. You can inquire with the Adobe sales folks, but don't expect any credit. At this point, I would suggest just buying AA DC, rather than AA XI.
Maybe you are looking for
-
How to copy my iphoto from one external hard disc to another?
Hi, I am trying to copy my iphoto library that is on my external hard disc to another empty external hard disc, but i keep getting this message: You can't copy "iPhoto Library" because it has the same name as another item on the destination volume, a
-
How to Prevent Apple Support Communities from Sending Me Emails?
Hi, How I can I prevent the Apple Support Communities website / tool from sending me emails? I have disabled all emails in my profile settings (since about six months): Still, Apple Support Communities keep sending me emails in increasing frequency:
-
Fast delete in Oracle database
Hi experts, Is there any way to fast delete records in the table with the condition? We can do the truncate statement this is the fastest way to remove all records in table, but for my case is need to keep records with do not match with conditions. T
-
Hi, I created the transport request.I want to release the transport request from developement to testing , Please tell me how to do that. regards, chinna.
-
Every time I pull down my notifications the phone reboots. Is there a solution for this glitch in ios7?