Help to find WorkID before the last touch transaction
Hi,
May I ask your help on how to find the transaction (WorkID) or touched before the last transaction.
The last touched or transaction for per Itemcode should be "FJ_CBDEF". I have a sample data and DDL as your reference. In my Sample data the 2 result item will be "FJ_LMDADS" and "FJ_CBVFI2"
sample:
FJ_ENTRY
FJ_LMDADS--retrieve this workid
FJ_CBDEF--last touched
Create table #maintable
(Item nvarchar(35), Itemcode nvarchar(35))
Insert into #maintable(item,itemcode) values ('AAAAA','RPT00000001')
Insert into #maintable(item,itemcode) values ('BBBBB','RPT00000002')
Create table #Table1
(Itemcode nvarchar(35), RankNum int, WorkID nvarchar(35), CreatedDatetime datetime)
Insert into #table1(itemcode, RankNum, WorkID,CreatedDatetime) values ('RPT00000001','5','FJ_Pentry','2015-01-12 23:50:48.000')
Insert into #table1(itemcode, RankNum, WorkID,CreatedDatetime) values ('RPT00000001','15','FJ_CBDEF','2015-01-14 05:23:10.000')
Insert into #table1(itemcode, RankNum, WorkID,CreatedDatetime) values ('RPT00000001','10','FJ_LMDADS','2015-01-13 15:03:56.000')
Insert into #table1(itemcode, RankNum, WorkID,CreatedDatetime) values ('RPT00000002','0','FJ_Pentry','2015-01-12 23:53:47.000')
Insert into #table1(itemcode, RankNum, WorkID,CreatedDatetime) values ('RPT00000002','10','FJ_LMDADS','2015-01-13 14:52:15.000')
Insert into #table1(itemcode, RankNum, WorkID,CreatedDatetime) values ('RPT00000002','15','FJ_DiAss','2015-01-13 16:24:35.000')
Insert into #table1(itemcode, RankNum, WorkID,CreatedDatetime) values ('RPT00000002','20','FJ_CBVFI2','2015-01-13 19:47:36.000')
Insert into #table1(itemcode, RankNum, WorkID,CreatedDatetime) values ('RPT00000002','25','FJ_CBDEF','2015-01-14 05:22:52.000')
Create table #Table2
(Itemcode nvarchar(35), RankNum int, WorkID nvarchar(35), CreatedDatetime datetime, FCode nvarchar(5))
Insert into #table2(itemcode, RankNum, WorkID, CreatedDatetime, FCode) values ('RPT00000001','10','FJ_LMDAD','2015-01-12 23:50:48.000','FJ001')
Insert into #table2(itemcode, RankNum, WorkID, CreatedDatetime, FCode) values ('RPT00000002','20','FJ_CBVFI2','2015-01-13 19:47:36.000','FJ004')
Select m.Item, m.Itemcode, t1.RankNum, t1.WorkID, t1.CreatedDatetime, t2.FCode,
rn=ROW_NUMBER() OVER (partition by m.Itemcode order by m.Itemcode , t1.CreatedDatetime desc )
From #maintable m
Left join #Table1 t1
On t1.Itemcode = m.Itemcode
Left Join #Table2 t2
On t2.Itemcode = t1.Itemcode and t2.RankNum = t1.RankNum
Order by m.Itemcode, t1.RankNum
select * from (
Select m.Item, m.Itemcode, t1.RankNum, t1.WorkID, t1.CreatedDatetime, t2.FCode,
rn=ROW_NUMBER() OVER (partition by m.Itemcode order by t1.CreatedDatetime desc )
From #maintable m
Left join #Table1 t1
On t1.Itemcode = m.Itemcode
Left Join #Table2 t2
On t2.Itemcode = t1.Itemcode and t2.RankNum = t1.RankNum )
t
WHERE rn=2
Order by Itemcode, RankNum
Similar Messages
-
Retrive a record before the last inserted record
Hi,
I use simple select statement to retrive records where cola = 'Yes':
select * from tbl1
where cola = 'Yes';
The result gives me about 10 records with different date.
From the above result, I want to get the record right before the last inserted record according to the date field; which means I can not use MAX function (all I want just one record).
If I write a function to return a date and passes it back to the SELECT statement, I'll get a date for each record, which I don't want.
I know there's a way to do that in PL/SQL.
Plese help me.
pemselect * from (
select * from
(select * from (select * from (table> order by <date> desc) where rownum < 3)
order by <date>) where rownum =1 -
How to find out when the last time a tcode was run by someone
Hi Team,
I am just trying to find out if there is a way to find out when the last time a tcode was run by someone.I mean i need to know when was a certain tcode was last run.
Thanks,
PriyankaHI Priyanka
Another way would be using transaction STAT,enter the t-code you like to monitor.This will provide all details,like user, time etc...
Hope this will help
Thanks
Santosh Kumar -
ORA-01190: control file or data file 1 is from before the last RESETLOGS
hi, experts.
i have oradb 11g and using it for OIM11
after some actions in oim i try to get my db to previous state (many times it was done successfully)
but now i have problem ORA-01190: control file or data file 1 is from before the last RESETLOGS
im runing in noarchivelog mode
i have autobackup of controlfile and i have 2 backups of my db
please help me
maybe some one know how to restore my backup to new db and then change configuration of wls and oim...Hi, Thanks for reply
List of Database Incarnations
DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
1 1 OIMDB 2372279074 PARENT 1 02-APR-10
2 2 OIMDB 2372279074 PARENT 940976 11-JUL-11
3 3 OIMDB 2372279074 PARENT 5590849 09-AUG-11
4 4 OIMDB 2372279074 PARENT 5590850 10-AUG-11
5 5 OIMDB 2372279074 PARENT 5596482 11-AUG-11
7 7 OIMDB 2372279074 PARENT 5596483 11-AUG-11
8 8 OIMDB 2372279074 PARENT 5596484 12-AUG-11
6 6 OIMDB 2372279074 ORPHAN 5622931 11-AUG-11
9 9 OIMDB 2372279074 PARENT 5627526 18-AUG-11
10 10 OIMDB 2372279074 PARENT 5627527 18-AUG-11
11 11 OIMDB 2372279074 ORPHAN 5627528 18-AUG-11
12 12 OIMDB 2372279074 CURRENT 5627528 18-AUG-11
RMAN> list backup;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
9 Full 1.50G DISK 00:00:31 12-AUG-11
BP Key: 9 Status: AVAILABLE Compressed: NO Tag: TAG20110812T114515
Piece Name: D:\APP\999-ILYASOV\FLASH_RECOVERY_AREA\OIMDB\BACKUPSET\2011_08_12\O1_MF_NNNDF_TAG20110812T114515_749PJDCW_.BKP
List of Datafiles in backup set 9
File LV Type Ckp SCN Ckp Time Name
1 Full 5627525 12-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\SYSTEM01.DBF
2 Full 5627525 12-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\SYSAUX01.DBF
3 Full 5627525 12-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\UNDOTBS01.DBF
4 Full 5627525 12-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\USERS01.DBF
5 Full 5627525 12-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\DEV_OIMLOB.DBF
6 Full 5627525 12-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\DEV_IASSDPM.DBF
7 Full 5627525 12-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\DEV_MDS.DBF
8 Full 5627525 12-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\DEV_SOAINFRA.DBF
9 Full 5627525 12-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\DEV_OIM.DBF
BS Key Type LV Size Device Type Elapsed Time Completion Time
10 Full 9.36M DISK 00:00:01 12-AUG-11
BP Key: 10 Status: AVAILABLE Compressed: NO Tag: TAG20110812T114515
Piece Name: D:\APP\999-ILYASOV\FLASH_RECOVERY_AREA\OIMDB\BACKUPSET\2011_08_12\O1_MF_NCSNF_TAG20110812T114515_749PKJJS_.BKP
SPFILE Included: Modification time: 12-AUG-11
SPFILE db_unique_name: OIMDB
Control File Included: Ckp SCN: 5627525 Ckp time: 12-AUG-11
BS Key Type LV Size Device Type Elapsed Time Completion Time
11 Full 1.33G DISK 00:00:26 16-AUG-11
BP Key: 11 Status: AVAILABLE Compressed: NO Tag: TAG20110816T094954
Piece Name: D:\APP\999-ILYASOV\FLASH_RECOVERY_AREA\OIMDB\BACKUPSET\2011_08_16\O1_MF_NNNDF_TAG20110816T094954_74N183D7_.BKP
List of Datafiles in backup set 11
File LV Type Ckp SCN Ckp Time Name
1 Full 6118204 16-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\SYSTEM01.DBF
2 Full 6118204 16-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\SYSAUX01.DBF
3 Full 6118204 16-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\UNDOTBS01.DBF
4 Full 6118204 16-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\USERS01.DBF
5 Full 6118204 16-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\DEV_OIMLOB.DBF
6 Full 6118204 16-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\DEV_IASSDPM.DBF
7 Full 6118204 16-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\DEV_MDS.DBF
8 Full 6118204 16-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\DEV_SOAINFRA.DBF
9 Full 6118204 16-AUG-11 D:\APP\999-ILYASOV\ORADATA\OIMDB\DEV_OIM.DBF
BS Key Type LV Size Device Type Elapsed Time Completion Time
12 Full 9.36M DISK 00:00:01 16-AUG-11
BP Key: 12 Status: AVAILABLE Compressed: NO Tag: TAG20110816T094954
Piece Name: D:\APP\999-ILYASOV\FLASH_RECOVERY_AREA\OIMDB\BACKUPSET\2011_08_16\O1_MF_NCSNF_TAG20110816T094954_74N197JO_.BKP
SPFILE Included: Modification time: 16-AUG-11
SPFILE db_unique_name: OIMDB
Control File Included: Ckp SCN: 6118204 Ckp time: 16-AUG-11How to reset database to right incarnation.? -
Instr to pick up anything before the last dot
This is on oracle 10.2.0.3 on unix using sqlplus
I am trying to write a select statement that picks up anything after the first - (dash) symbol and before the last . (dot) in a string.
I got the first part right -- to pick up anything after the first dash
SELECT SUBSTR('P3834_MD-1.14.script', INSTR('P3834_MD-1.14.script','.' )-1)
FROM dual;
1.14.script
How do I further string this down so that it retrieves me everything that is before the last . (dot) which is 1.14
I may have several dots, for example 1.1.33.4.script . I still need 1.1.33.4Hi,
In Oracle 10 (and up) that kind of thing is much easier using regular expressions.
To find everything from the first '-' through the last '.' in a string s:
REGEXP_SUBSTR ( s
, '-' -- hyphen
|| '.*' -- 0 or more characters (period matches anything)
|| '\.' -- period (escaped because period has special meaning)
)Using INSTR, you can give -1 as the third argument to tell INSTR to search backwards from the end of the string:
INSTR ( s
, -1
) -
When closing Firefox windows, I would like a warning before the last window closes. The about:config settings do nothing. There is a warning for multiple tabs... why not for the last window? I do not use tabs... just windows... I have a mouse button programmed for that. It is really irritating to have to restart Firefox all the time and then open the history window because no warning was issued!
This is ridiculous. I've had this problems for years now and I'm finally walking away from Firefox. I use my keyboards more than my mouse, and how many times does your finger slip and hit Command Q instead of W. How come FF can't reset something as trivial as this? So many people are having problems with this?
Feels like FF has become too big, too slow and just not cooperative anymore. What a shame, I've been using Netscape/Firefox for 13 years. This is silly. -
Lately I have been getting a rectangular screen titled Login Setting, with my Username and Password and asking me to Login. This screen shows up on opening the computer and has never been seen before the last month or so. It has one box titled Login Credentials with a username and password field and a second box titled Login Status at the bottom where it says "Profile not found" in red. I've never seen this before and ignoring it does not effect any operations. Is this legitimate or some kind of identity fishing?
Hello,
Have you done the recent Security updates?
Is this from Sleep or on bootup?
Timing is about right for the FlashBack attack.
Disable Java in your Browser settings, not JavaScript.
http://support.apple.com/kb/HT5241?viewlocale=en_US
http://support.google.com/chrome/bin/answer.py?hl=en-GB&answer=142064
http://support.mozilla.org/en-US/kb/How%20to%20turn%20off%20Java%20applets
Flashback - Detect and remove the uprising Mac OS X Trojan...
http://www.mac-and-i.net/2012/04/flashback-detect-and-remove-uprising.html
In order to avoid detection, the installer will first look for the presence of some antivirus tools and other utilities that might be present on a power user's system, which according to F-Secure include the following:
/Library/Little Snitch
/Developer/Applications/Xcode.app/Contents/MacOS/Xcode
/Applications/VirusBarrier X6.app
/Applications/iAntiVirus/iAntiVirus.app
/Applications/avast!.app
/Applications/ClamXav.app
/Applications/HTTPScoop.app
/Applications/Packet Peeper.app
If these tools are found, then the malware deletes itself in an attempt to prevent detection by those who have the means and capability to do so. Many malware programs use this behavior, as was seen in others such as the Tsunami malware bot.
http://reviews.cnet.com/8301-13727_7-57410096-263/how-to-remove-the-flashback-ma lware-from-os-x/
http://x704.net/bbs/viewtopic.php?f=8&t=5844&p=70660#p70660
The most current flashback removal instructions are F-Secure's Trojan-Downloader:OSX/Flashback.K.
https://www.securelist.com/en/blog/208193454/Flashfake_Removal_Tool_and_online_c hecking_site
More bad news...
https://www.securelist.com/en/blog/208193467/SabPub_Mac_OS_X_Backdoor_Java_Explo its_Targeted_Attacks_and_Possible_APT_link -
Smartforms - Identify the page just before the last page
Hi,
I need to add OMR code into a Smartforms, I print my form in duplex mode, and my OMR code must be only in the odd page (1, 3, 5, 7 ...).
In the OMR code, I must set the end of the grouping, this end occurs at the last odd page. But if the last page is pair (2 4 6 8 ...), I need to the the ending code to the page just before the end.
So, I need to identify the page just before the last page.
My problem is, when I debug the Smartforms, the SFSY-FORMPAGES contains the actual page, not the value of the last page.
if someone have an idea ..
FredMaybe I found the solution :
Note 359009 - Postprocessing and query of the total number of pages
I check and make a return (if a day someone have the same problem)
Fred -
Recovery to a time before the last resetlog issue
Hi experts!
Env: 11.2.0.2 including a 11.2.0.2 RMAN recovery catalog.
Having big trouble understanding what is happening here.. I'm trying to return my database to a time before the last resetlogs time, but cannot as RMAN always gives "RMAN-20011: target database incarnation is not current in recovery catalog". And yes, I've reset database to previous incarnation.
[oracle@targetdb backup]$ rman
Recovery Manager: Release 11.2.0.2.0 - Production on Wed May 15 22:01:39 2013
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
RMAN> connect target
connected to target database: TRGDB (not mounted)
RMAN> connect catalog rman/rman@rmancat
connected to recovery catalog database
List of Database Incarnations
DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
1 15 TRGDB 1659522178 PARENT 1 13.08.2012 06:51:46
1 16 TRGDB 1659522178 ORPHAN 765647 31.10.2012 07:47:00
1 17 TRGDB 1659522178 PARENT 765821 31.10.2012 07:53:07
1 18 TRGDB 1659522178 PARENT 815390 05.11.2012 14:41:39
1 19 TRGDB 1659522178 PARENT 816252 05.11.2012 15:05:16
1 2 TRGDB 1659522178 PARENT 1825516 24.04.2013 21:33:32
1 523 TRGDB 1659522178 PARENT 2127837 13.05.2013 13:24:51
1 521 TRGDB 1659522178 PARENT 2181465 14.05.2013 08:57:42
1 1154 TRGDB 1659522178 CURRENT 2257381 15.05.2013 21:32:08
RMAN> reset database to incarnation 521;
database reset to incarnation 521
RMAN> restore controlfile from '/home/oracle/backup/c-1659522178-20130515-00';
Starting restore at 15.05.2013 21:50:54
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=10 device type=DISK
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
output file name=/home/oracle/oradata/TRGDB/controlfile/o1_mf_82l1ml9w_.ctl
output file name=/home/oracle/oradata/fast_recovery_area/TRGDB/controlfile/o1_mf_82l1mljs_.ctl
Finished restore at 15.05.2013 21:50:55
RMAN> sql "alter database mount";
sql statement: alter database mount
released channel: ORA_DISK_1
RMAN> run
2> {
3> set until time "to_date('15-05-2013 20:15:00','dd-mm-yyyy hh24:mi:ss')";
4> restore database;
5> recover database;
6> }
executing command: SET until clause
Starting restore at 15.05.2013 21:52:07
Starting implicit crosscheck backup at 15.05.2013 21:52:07
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=12 device type=DISK
Crosschecked 12 objects
Finished implicit crosscheck backup at 15.05.2013 21:52:09
Starting implicit crosscheck copy at 15.05.2013 21:52:09
using channel ORA_DISK_1
Finished implicit crosscheck copy at 15.05.2013 21:52:09
searching for all files in the recovery area
cataloging files...
cataloging done
List of Cataloged Files
=======================
File Name: /home/oracle/oradata/fast_recovery_area/TRGDB/archivelog/2013_05_15/o1_mf_1_15_8s7rosfg_.arc
File Name: /home/oracle/oradata/fast_recovery_area/TRGDB/archivelog/2013_05_15/o1_mf_1_16_8s7rosg0_.arc
File Name: /home/oracle/oradata/fast_recovery_area/TRGDB/archivelog/2013_05_15/o1_mf_1_1_8s7rp9st_.arc
File Name: /home/oracle/oradata/fast_recovery_area/TRGDB/archivelog/2013_05_15/o1_mf_1_2_8s7rp9lt_.arc
File Name: /home/oracle/oradata/fast_recovery_area/TRGDB/archivelog/2013_05_15/o1_mf_1_17_8s7rorkn_.arc
File Name: /home/oracle/oradata/fast_recovery_area/TRGDB/archivelog/2013_05_15/o1_mf_1_14_8s7rory4_.arc
skipping datafile 8; already restored to file /home/oracle/oradata/TRGDB/datafile/o1_mf_aud_trai_8qlfhw19_.dbf
restore not done; all files read only, offline, or already restored
Finished restore at 15.05.2013 21:52:11
Starting recover at 15.05.2013 21:52:11
using channel ORA_DISK_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 05/15/2013 21:52:11
RMAN-06004: ORACLE error from recovery catalog database: RMAN-20011: target database incarnation is not current in recovery catalogThe controlfile I restored above ('/home/oracle/backup/c-1659522178-20130515-00') is from before the last resetlogs.
Also I notice in the alert log during "searching for all files in the recovery area.."
Wed May 15 21:52:09 2013
Setting recovery target incarnation to 9
Setting recovery target incarnation to 9It seems to me that RMAN "ups" the incarnation back to the CURRENT one (the one before I ran reset incarnation command).
But why?
I'm obviously doing something wrong here, please shed some expert enlightment.
Thanks!Hello;
Been awhile, probably time for me to test this again. Here's what I think :
The database with the DBID (1659522178) and DBINC_KEY (521) has to be reset in the recovery catalog and re-registered for its backups to resume.
RMAN> reset database to incarnation 521;
database reset to incarnation 521
RMAN> register database;In my way old notes I do :
RMAN> connect target sys/sys
RMAN> startup nomount
RMAN> restore controlfile from'....
RMAN> Alter database mount
RMAN> reset database to incarnationSo use target database controlfile instead of recovery catalog
Best Regards
mseberg
Edited by: mseberg on May 15, 2013 6:12 PM -
I deleted photos cause the capacity is so big but i backup first on itunes then when i was to restore some of those i cannot find photos from the last backup that i 've done. What to do?
As far as i know, you can use a third party iPad photos recovery software to have a try. If i remember correctly, this software has two methods to restore your photos. One is recovering from your iTunes backup, another is recovering from your iPad directly.
http://easy-iphone-recovery.blogspot.com/iphone-recovery-resource.html
It is worth to try if your photos are important. -
Ora9i physical stby db failover-recover to the last committed transaction
Example: The primary db is not accessible. But we can still access the archived and online redo log files (physically in OS).
How to recover to the last committed transaction (on primary db) while we do failover on standby?
I just able to recover to the last transaction in the last archived redo log.912030 wrote:
The database is not available, but I can still copy all archived redo log & online redo log files from primary db to standby db physically by OS command.
I register and apply all archived log files to my standby db before perform failover.
SQL> ALTER DATABASE REGISTER PHYSICAL LOGFILE 'filespec1';
But I just able to recover to the last transaction in the last archived redo log, not the last commited transaction in (current) online redo logs in primary db before it breaks down.You can copy & apply all the archive log files, If you want to apply even current redo log file use below command
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE;
Check in detail http://docs.oracle.com/cd/B28359_01/server.111/b28294/log_apply.htm
Hope that file is not corrupted, But before that create a restore point for safe side if any recover issues you can flashback to that point.
Until you have archive logs if you applied safely you can open database by performing failover.
If you apply using Redo log files, it may cause some consistency.
Or perform until TIME based recover as
SQL> recover automatic standby database until time '2011-11-17 14:00:00';
Check this link as well
http://laurentschneider.com/wordpress/2011/11/failover-to-standby-with-a-delay-until-time.html
HTH. -
Before the latest update to iTunes, everything was listed by artist. All albums by the same artist were listed together. Now they are all separated by the name of the album instead of the artist. How do I return to the other format?
Are you viewing it in Artist view or Album view? In Album view, it should still list albums by artist name, then album name. If you're in Album view, you might be looking for Artist view.
-
i'm not sure what i have done...either i reinstalled forefox or updated it before and then..i didn't find any of my bookmarks..i restored already the oldest one of the last ten packups...but i couldn't find any of them too..i don't know how this could happen with firefox..plz tell me how can i bring them back?..
Hi youssef8888, you might also want to search your entire C drive to see whether your bookmark backup files might be in an unexpected location. I would try this pattern:
bookmarks-2013*.*
To make sure your search checks for hidden files and folders, see this article from Microsoft: [http://windows.microsoft.com/en-us/windows/show-hidden-files]. -
Help with pulling records for the last 24 hours
Post Author: kbrinton
CA Forum: Formula
Hi,
I don't know what is wrong with me but I can not figure out how to get Crystal to pull records for the last 24 hours. I have a date field I can key off of but I can not figure out the formula or correct syntax to put in the Selection formula. Any help would be great!! ThanksPost Author: SKodidine
CA Forum: Formula
No need to create any formula. In your record selection criteria type:
{table.date} in dateadd("h",-24,currentdatetime) to currentdatetime
If you just want the prior 24hrs and do not care about the time then replace 'currentdatetime' with 'currentdate'.
(currentdatetime - 24) will give you 24 days before and not 24 hours. -
How to find FIRST and the LAST date of the month.
Hello,
I want to find the first and the last date of the current month through query. How is it possible please help.
For example if the current month is july. The first date should be 01-JUL-2006 and the last date would be 31-JUL-2006.
Please help me.
Regards,
Imran BaigLike this?
SQL> select trunc(sysdate,'MM') "First_Day",
2 last_day(sysdate) "Last_Day" from dual;
First_Day Last_Day
01-JUL-06 31-JUL-06
SQL> select trunc(to_date('10-FEB-04'),'MM' ) "First_Day",
2 last_day(to_date('10-FEB-04')) "Last_Day" from dual;
First_Day Last_Day
01-FEB-04 29-FEB-04
Maybe you are looking for
-
Connecting audio speakers via external Bluetooth module
I have an USB bluetooth module (manufactured by Broadcom) to connect to a bluetooth-enabled stereo, but it won't work. I think it must be a software problem. Can anyone help with this? The device is set up properly, and paired with the stereo. But in
-
How do I update photoshop CC camera raw to 8.4?
How do I update Photoshop CC camera raw from 8.3 to 8.4? I keep getting an error message in Lightroom 5 that my camera raw plugin needs to be updated to 8.4. thanx...Miriam
-
Hi! I have some doubts regarding the authorizations for the RFC logon user.The same question is disussed in the forum.But I am still confused.I mean authorizations to the user for which we set the user id and password in the RFC destinations in SM5
-
MS13-002 Security Update for Microsoft XML Core Services 4.0
I've tried to cache this patch 3 times now for my client and each time, it shows as cached but when trying to remediate it, it fails to cache to the client. Has anyone else had problems with this one? For now, I've disabled it but since it's listed a
-
Picbasic source - compiled to MAC OS
I work for a company that manufactures traffic calming products. Our software development for the sign has been in picbasic which is then compiled for the windows environment. I need to locate a compiler that will hopefully compile it for use on the