How to get the second and third weekend of every month over a period of time?
Hello
No idea how to get the second and third weekend of every month on a given period without use of CLAUSE?
Thanks in advance.
Try it below,
SELECT CASE WHEN TO_CHAR (ADD_MONTHS (TRUNC(startdate,'MM'),(LEVEL-1)), 'DY') = 'SAT '.
THEN ADD_MONTHS (TRUNC(startdate,'MM'),(LEVEL-1)) + 1
WHERE TO_CHAR (ADD_MONTHS (TRUNC(startdate,'MM'),(LEVEL-1)), 'DY') = 'Sun '.
THEN ADD_MONTHS (TRUNC(startdate,'MM'),(LEVEL-1)) + 6
Of OTHER NEXT_DAY (ADD_MONTHS (TRUNC(startdate,'MM'),(LEVEL-1)), "SAT") + 1
END as second_weekendday,
BOX WHEN TO_CHAR (ADD_MONTHS (TRUNC(startdate,'MM'),(LEVEL-1)), 'DY') = 'SAT '.
THEN ADD_MONTHS (TRUNC(startdate,'MM'),(LEVEL-1)) + 7
WHERE TO_CHAR (ADD_MONTHS (TRUNC(startdate,'MM'),(LEVEL-1)), 'DY') = 'Sun '.
THEN ADD_MONTHS (TRUNC(startdate,'MM'),(LEVEL-1)) + 7
Of OTHER NEXT_DAY (ADD_MONTHS (TRUNC(startdate,'MM'),(LEVEL-1)), "SAT") + 7
END AS third_weekendday
FROM (SELECT SYSDATE startdate,
SYSDATE + 300 enddate
THE DOUBLE)
CONNECT BY LEVEL<=>=>
Tags: Database
Similar Questions
-
How can I get the second and third highest salary from the emp table
How can I get the second and third highest salary from the emp table in the ecah DepartmentSQL> ed Wrote file afiedt.buf 1 select empno, ename, sal, deptno 2 from ( 3 select empno, ename, sal, deptno, dense_rank() over (partition by deptno order by sal desc) as rn 4 from emp 5 ) 6* where rn in (2,3) SQL> / EMPNO ENAME SAL DEPTNO ---------- ---------- ---------- ---------- 7782 CLARK 2450 10 7934 MILLER 1300 10 7566 JONES 2975 20 7876 ADAMS 1100 20 7499 ALLEN 1600 30 7844 TURNER 1500 30 6 rows selected. SQL>
-
How to: Apply the second and third output referenced Formulation
Our use case is-
There are several ways to squeeze oranges in orange juice of matter with levels of by-products. We have a 'main' formulation that produces a material output referneced of Orange juice. We want to now relate to additional formulations. How this is done?
Now our business has been... create formulation 500001-001 with output material 5000002-001
We have also created formulations 500003-001 and 500004-001
When you go to the material specification > > partners fact sheet > > produced by... Open in Edit Mode
We are not dealing with an Add button to connect the formulation 500003-001 and 500004-001
If there is another way to do it, I didn't understand it although people have tried to explain it to me. Could I get an idea of the stream click to get results... referenced material output with several options.
Thank you. Beckie
Thanks Sherry,
I was trying to understand the course of "add material specifications 500002 - 001 as a material output of formulation" 500003-001... It does appear to me that I could change something exit we created. After several hours of looking at this, I found the 14 steps to the product developer. Thank you.
-
How to get the second line in an indented bulleted list...
Hello
I understand how to get flea and list numbering, and I added numbers to a list that will be used (although the content will be replaced) on about a hundred pages of my cookbook. Many numbered tickets are just a single line, but some entries are two or three lines, and in these cases, the text begins on the left directly under the number on it - I prefer the second and third lines of text to start directly under the text in the above numbered line. In which case I'm not explain correctly, here is a small screenshot (it comes through hope):
Did someone mind telling me how to solve this problem?
Thank you very much
Malcolm
Can you show a screenshot with the same panels open screen I've had, and the selected numbered text?
Also, I should have mentioned that to move just down half of the arrow on the tab of the Panel, you must hold down the SHIFT key at the same time.
-
How to calculate the second and minisecond for audio landmark
I'm doing a sound synchronization for the clip audio and video in Flash. I found a tutorial on the web, and it seems to work. However, I do not know how to calculate the second and the mini (deuxieme from mp3 file. The first frame has the following lines to set the duration for each animation:
Import class
Import net.quip.sound.SoundSync;
Stop the main timeline
Stop();
Create an instance of SoundSync
var ss:SoundSync = new SoundSync();
ss.addCuePoint ("IT", 20100);
ss.addCuePoint ("admin", 20000);
ss.addCuePoint ("maintenance", 19800);
ss.addCuePoint ("treatment", 16479);
ss.addCuePoint ("engineering", 14598);
as.addCuePoint ("logo_epa_npdes", 12356);
ss.addCuePoint ("construction", 8967);
ss.addCuePoint ("370 mg/j", 7896);
ss.addCuePoint ("mc_650, 000 ', 5439);
ss.addCuePoint ("130 mg/j", 3254);
ss.addCuePoint ("1938", 2439);
ss.addCuePoint ("vintage_mc", 0);
Use the instance of loading external MP3
ss.loadSound ("Scn04 - 05.mp3", true);
Create a listener object for the
cuePoint and onSoundComplete events
var listener: Object = new Object();
listener.cuePoint = function (): Void {}
Play();
}
listener.onSoundComplete = function (): Void {}
Play();
}
ss.addEventListener ("cuePoint", listener);
ss.addEventListener ("onSoundComplete", listener);
and the soundsync.as file as follows:
Import mx.events.EventDispatcher;
Import mx.utils.Delegate;
class net.quip.sound.SoundSync extends its {}
PROPERTIES
private var _cuePoints:Array;
private var _currentCuePoint:Number;
private var _interval:Number;
private var _intervalDuration:Number;
private var _secondOffset:Number;
Event dispatcher
public var dispatchEvent:Function;
public var addEventListener:Function;
private var removeEventListener:Function;
CONSTRUCTOR
public void SoundSync(target:MovieClip) {}
Super (target);
init();
}
METHODS
private function init (): Void {}
Initialize properties
_cuePoints = new Array();
_currentCuePoint = 0;
_intervalDuration = 200;
_secondOffset = 0;
Initialize the instance of the class as the valid event broadcaster
EventDispatcher.initialize (this);
}
Add Cue Point
public void addCuePoint(cuePointName:String,_cuePointTime:Number):Void {}
() _cuePoints.push
{
type: "cuePoint",.
name: cuePointName,.
time: cuePointTime,.
target: this
}
);
_cuePoints.sortOn ("time", Array.NUMERIC);
}
Get cue point
public void getCuePoint(nameOrTime:Object):Object {}
var counter: Number = 0;
While (counter < _cuePoints.length) {}
If (typeof (nameOrTime) == 'string') {}
If (_cuePoints [meter] .name == nameOrTime) {}
return _cuePoints [counter];
}
} Else if (typeof (nameOrTime) == 'number') {}
If (_cuePoints [meter] .time == nameOrTime) {}
return _cuePoints [counter];
}
}
counter ++;
}
Returns a null value.
}
Get the Index of the current Cue Point
private void getCurrentCuePointIndex(cuePoint:Object):Number {}
var counter: Number = 0;
While (counter < _cuePoints.length) {}
If (_cuePoints [meter] .name == cuePoint.name) {}
return the meter;
}
counter ++;
}
Returns a null value.
}
Get the next Cue Point index
private void getNextCuePointIndex(seconds:Number):Number {}
seconds (seconds) =? seconds: 0;
var counter: Number = 0;
While (counter < _cuePoints.length) {}
If (_cuePoints [meter] .time > = seconds * 1000) {}
return the meter;
}
counter ++;
}
Returns a null value.
}
Benchmark deleted
public void removeCuePoint(cuePoint:Object):Void {}
_cuePoints.splice (getCurrentCuePointIndex (cuePoint), 1);
}
Remove all Cue Points
public function removeAll_cuePoints (): Void {}
_cuePoints = new Array();
}
Beginning
public void start(secondOffset:Number,_loops:Number):Void {}
Super.Start (secondOffset, loops);
dispatchEvent ({type: "onStart", target: this});
Reset benchmark
_secondOffset = secondOffset;
_currentCuePoint = getNextCuePointIndex (secondOffset);
Poll for cue points
clearInterval (_interval);
_interval = setInterval (Delegate.create (this, pollCuePoints), _intervalDuration);
}
Load sound
public void loadSound(url:String,_isStreaming:Boolean):Void {}
super.loadSound (url, isStreaming);
clearInterval (_interval);
_interval = setInterval (Delegate.create (this, pollCuePoints), _intervalDuration);
}
Stop
public void stop(linkageID:String):Void {}
If {(linkageID)
Super.Stop (linkageID);
} else {}
Super.Stop ();
}
dispatchEvent ({type: "onStop", target: this});
Kill the ballot
clearInterval (_interval);
}
Survey benchmarks
private function pollCuePoints (): Void {}
If the current position is close to the cue point.
var time: Number = _cuePoints [_currentCuePoint] .time;
var span: Number = (_cuePoints [_currentCuePoint + 1] .time)? _cuePoints [_currentCuePoint + 1] .time: time + _intervalDuration * 2;
If (position > = time & & position < = span) {}
Send event
dispatchEvent (_cuePoints [_currentCuePoint]);
Advance to the next landmark...
If (_currentCuePoint < _cuePoints.length) {}
_currentCuePoint ++;
} else {}
_currentCuePoint = getNextCuePointIndex (_secondOffset);
}
}
}
EVENT HANDLERS
onSoundComplete
public function onSoundComplete (): Void {}
Kill the ballot
clearInterval (_interval);
Reset benchmark
_currentCuePoint = 0;
Send event
dispatchEvent ({type: "onSoundComplete", target: this});
}
}
any help will be greatly appreciated.Wuzhishan,
> Hi Dave, your tutorial is very cute and it is very useful.
Thank you! My daughter is cute. She inherited all of
me, so I have not left. ;)> I'm sorry that I don't have my question clearly.
No worries. :)
> I have listen mp3 in Windows Media Player and try to
> get both for the tail, I found it on the bottom of the
> player time indicates 00:26.I'm with you.
> How can I writer this number in the code? Is it 0026 or 26?
The code expects milliseconds, then 26 seconds would be written as
this:26000
If he said 01:22 (one minute and 22 seconds), you must write it like this:
82000
... which is 60 seconds for now, 22 seconds
side, then multiplied by 1,000 to get milliseconds.David Stiller
Adobe Community Expert
Dev blog, http://www.quip.net/blog/
"Luck is the residue of good design." -
How to get the second Monday of each month in a given date range?
In Oracle forms, how to get the second Monday of each month in a given date range?
I tried below using the query WITH the Clause, but it seems that WITH Clause does not work in Oracle forms. So is there another way to do this in Oracle forms?
WITH month_range AS
(
SELECT TO_DATE ('Dec 2013', 'Mon YYYY') AS first_month
, TO_DATE ('Mar 2014', 'Mon YYYY') AS last_month
OF the double
)
SELECT NEXT_DAY (6 + ADD_MONTHS (first_month
, LEVEL - 1
)
, 'MONDAY '.
) AS second_monday
OF month_range
CONNECTION OF LEVEL < = 1 + MONTHS_BETWEEN (last_month, first_month)
;
Thanks in advance.
Good fishing, when the first day of the month is Thursday... So I changed the query accordingly... Try the below
SELECT CASE WHEN TO_CHAR (ADD_MONTHS (TRUNC(startdate,'MM'),(LEVEL-1)), 'DY') = 'game '.
THEN NEXT_DAY (ADD_MONTHS (TRUNC(startdate,'MM'),(LEVEL-1)), 'THU')
Of OTHER NEXT_DAY (ADD_MONTHS (TRUNC(startdate,'MM'),(LEVEL-1)), 'Game') + 7
END AS second_day
FROM (SELECT SYSDATE startdate,
SYSDATE + 300 enddate
THE DOUBLE)
CONNECT BY LEVEL<=>=>
-
How to get the width and height of Flex Mobile view?
Hello
The following instructions can get the width and height of the current Flex app:
var request: UIComponent = FlexGlobals.topLevelApplication as UIComponent;
trace (application. Width);
trace (application. Height);
But I don't know how to get the width and height of mobile display Flex current (i.e. the content size excludes bar action and the Navigation bar). Why the "this.width" always returns 0?
Thank you!
Looks like you're running in this bug: https://bugs.adobe.com/jira/browse/SDK-30070
-
How to get the maximum number of days in a month?
How to get the maximum number of days in a month?
I use a dateField. where I can get the month. Now, I want to get the maximum number of days in a month.
How can I get it?
Please help me. and thanks in advance... []
NET. RIM. Device.API.util
Class DateTimeUtilitiesgetNumberOfDaysInMonth (int month, int year)
Returns the number of days in the specified monthIt took me like 10 seconds to find it in the API, I guess you spent more time writing the post...
-
First images of the page and the writing is coming up on the second and third pages
I have almost finished my model, but my first photo of the edit page and a writing appears on my second and third page how to reslove this problem I have attached a picture link below
http://img138.imageshack.us/i/firstpageworkiscomingon.PNG/
If you place a keyframe is empty in the framework after the content of your first page, then you should not see a part of content of the first page beyond that.
-
How can I get the phone and messages apps in my dock? And for some reason, I discover now all my app pages from the middle of my phone and not at the top?
Try
Settings > general > reset > reset home screen presentation.
Note: All other applications will be organised by alphabetical order.
-
I changed my google chrome browser and I finally got my confiquered pc and printer. He is an all-in-one 2840 color laser jet. How do I get the scan and fax utilities to perform?
It is useful to include the manufacturer and model number.
What version of Windows you have, including the service pack?
How the device is connected to your computer (USB, Ethernet, other)?
Have you installed the software that came with your HP Color LaserJet 2840 AiO printer?
If not, why? If you did, what error messages you are seeing? Please report messages completely, without paraphrasing.
Start here: HP Color LaserJet 2820 and 2840 AiO products Series - first installation and install
-
How to get the number and the name of the contacts selector
Hi all
I got the Contact Picker work but I have no idea how to get the selected telephone number and the name.
There are attributes that I can put like contactId.value () to retrieve or there is another way?
Thanks in advance.
ImageButton{ defaultImageSource: "asset:///images/bluebutton.png" onClicked: { contactPicker.open(); } attachedObjects: [ ContactPicker { id: contactPicker onContactSelected: { result.text = "You chose contact: " + contactId; } } ] } Label { id: result text: "You chose contact: " }
Hello
You can get the contact name and phone number as this,
ImageButton{ defaultImageSource: "asset:///images/bluebutton.png" onClicked: { contactPicker.open(); } attachedObjects: [ ContactPicker { id: contactPicker onContactSelected: { result.text = "You chose contact: " + contactId; // call a cpp method to get the details
app.getDetails(contactId); } } ] } Label { id: result text: "You chose contact: " }
the CPP code:
void ContactDetails(ContactId id) { Contact contact_info = m_contactService->contactDetails(id); QString firstName = contact_info.firstName(); QString lastname = contact_info.lastName(); QList
phoneno_list = contact_info.phoneNumbers(); QStringList no_s; foreach(ContactAttribute attr, phoneno_list) { no_s << attr.value(); } } You can get details like this.
Kind regards
Naresh Kodumuri.
-
How to get the name and number of the procedure parameter list or a function?
I stated the procedure described in the package
If I want to get the number and the name of the parameter list, so how do I it
I don't have I her name with the package.
create or replace package demoApp is
PROCEDURE insert_data (p_fname IN VARCHAR2,
p_lname IN VARCHAR2,
p_address IN VARCHAR2,
p_cellno IN VARCHAR2,
p_email IN varchar2);
end demoApp;
create or replace package demoApp body is
PROCEDURE insert_data (p_fname IN VARCHAR2,
p_lname IN VARCHAR2,
p_address IN VARCHAR2,
p_cellno IN VARCHAR2,
p_email IN varchar2) IS
EmpID number;
BEGIN
Select nvl (max (emp1.empid), 0) + 1 in EMP1 empid;
INSERT INTO VALUES EMP1 (empid, p_fname, p_lname, p_address, p_cellno, p_email);
EXCEPTION
WHILE OTHERS THEN
raise_application_error (-20001,' insert the problem ' |) SQLERRM);
END;
end demoApp;
-----------------
I want to get the name of the parameter and the number of use of stroredrprocedure ""demoApp.insert_data " "
Select *.
of all_arguments
where package_name = 'DEMOAPP.
and object_name = 'INSERT_DATA.
-
How to get the LOGO and company name in the theme of the 4 apex
Hello
I use the theme 4 for apex 4.0.2.
I must have the logo as well as the name of the company the two, but when I select den Image it shows only the image in the dashboard and when I select den text it shows the name of the company.
How to get the two logo and the name of the company?
Thanks for your help.
Kind regards
Sébastien Pallav.Pushpesh Pallav says:
HelloI use the theme 4 for apex 4.0.2.
I must have the logo as well as the name of the company the two, but when I select den Image it shows only the image in the dashboard and when I select den text it shows the name of the company.The word is spelled 'then', not 'den '.
How to get the two logo and the name of the company?
Select the text, and include HTML, making reference to the image in the text:
Company NameThe image src URI used depends on the location of the image, which you have failed to specify.
-
How to get the length and sub lymph nodes.
Hello
find the script below.
< List1 >
< list >
< List1 >
< List1 >
< List1 >
< / list >
< list >
< List2 >
< List2 >
< List2 >
< / list >
--
--
-
-
-
-< / list1 >
Here the tag list will be growing based on the I / p. Now what I want is to know how to get the length of the tag < list >.
To implement the above I used the code below
var number = xfa.record.List1.List [0].nodes.length; (Does not work)
But if var account = xfa.record.List1.nodes.length; (work)
and also I want to delete a tag inside the < List > tag. How?
Very Urgent.
Thanks in advance.
Yes, you need to use the name instead of the value to get the tag name...
xfa.datsets.data.Root.nodes.item (0) .name
Thank you
Srini
Maybe you are looking for
-
Cannot configure FolderLink because the instructions are not clear.
When I select Tools, then options, I get nothing with attachments or outgoing. (I have an account HIghtail).
-
Ho preso UN virus con aggiornamento flash player molto fastidioso! Come posso risolvere?
Aggiornamento con virus flash play su mac pro, like risolve?
-
Webcam laptop hp laptop g60 model 235DX n.
Goodmorning, I have a hp laptop model g6o number 235dx, the included webcam works only with Skype. I buy a new external webcam trust but H05 result does not...? Center Pentecost pc action I installed the new driver. can u help me? by Stefano
-
I need help to uninstall then reinstall the Sims.
From: Marc Hello. I recently installed all my Sims 1 on my Vista pc. Because I installed them in the correct order the Sims himself to day when I tried to play and removed all expansion packs. I then tried to install it again, but it keeps telling m
-
How can I fix msi download to reinstall?
I'm having a problem with the .msi files. When I download a program which is an msi, it tries to use Notepad. This does not install the progam when I try to run it. I tried to change the association to msiexec.exe as there seems to be a windows insta