Getting the latest active month from database
I want to populate a drop down box with list of all 12-months starting July to June.
in this drop down box, the Default value is the most recent completed month in database (the month where an activity was recarded against). For instance if the latest month in database is Jun, the drop down box should display “Jun” as default value. have you knowledge of any query that can be used to achieve this?
In what version of what product?
This is the SQL and PL/SQL forum and neither SQL, nor PL/SQL has drop down boxes so perhaps you are in Oracle Forms, perhaps in JDeveloper, perhaps in Visual Basic, it is anybody's guess.
Similar Messages
-
Urgent !!! How to get the Latest Exchange Rate from a list
Helo Gurus,
I want to get the latest exchange rate for all currencies in BI 7.0. Now when I checked in the table its showing all the exchange rates for various currencies according to the date. My client want the latest exchange rate in the report for all currencies. Now when I generating the currencies into the report the rate getting cumulated.
For certain currencies the rate is updated very recently. But for others two months back.
<b>How it is possible to take only the latest exchange rate for all currencies and can generate the report.</b>
I am working in BI 7.0 and the BEx using is of version 3.5.Mathew,
usually the currenies and other settings will be loaded nightly, but in your case if you want it urgently you can do this.
RSA1->Source System>Transfer Exchange Rates. This will open up a screen with two options Simulation and Update. You can verify with SImulation and needed you can update. It will not create any issues.
Hope this helps.
Alex (Arthur Samson) -
To get the last 12 months from the input date
Hi ,
Is there any way in sql to get the last 12 months date if i input the sysdate.
LIke I will input sysdate (16-aug-13 ) and I need to get 16-jul-13,16-jun-13,16-may-13 like this.
This has to be done in the sql only with out using pl/sql
Regards,
Papiselect listagg(to_char(dt,'dd-mon-yy'),', ')
within group (order by dt desc) dates
from (select add_months(date '2013-08-16',level*-1) dt
from dual connect by level <=12
DATES
16-jul-13, 16-jun-13, 16-may-13, 16-apr-13, 16-mar-13, 16-feb-13, 16-jan-13, 16-dec-12, 16-nov-12, 16-oct-12, 16-sep-12, 16-aug-12 -
Master Child tables how to get the latest rows from both
Hi,
Need some help with the sql. I have two tables Master & Child. In my Master table I have multiple rows for the same record and in the child table also multiple rows for the same master row how can I get the latest one's from both.
For example Data in my Master table looks like
CONT_ID SEQ_NUM DESCRIPTION
1 189 Update 2
1 188 Update 1
1 187 NewNow in the child table for the same CONT_ID I may have the following rows
CONT_ID UPDATED_DATE STATUS
1 3/16/2010 2:19:01.552700 PM P
1 3/16/2010 12:29:01.552700 PM A
1 3/16/2010 12:29:01.552700 PM P
1 3/16/2010 12:19:01.552700 PM NIn my final query how can I get the row with seq_num 189 as it's the latest in Master table and from child table the row with status of P as it's the latest one based on the time. Here is the query i have but it returns the latest row from the child table only and basically repeats the master table rows as opposed to one row that is latest from both:
ThanksHi,
You can use the analytic ROW_NUMKBER function to find the latest row for each cont_id in each table:
WITH got_m_rnum AS
SELECT cont_id, seq_num, description
, ROW_NUMBER () OVER ( PARTITION BY cont_id
ORDER BY seq_num DESC
) AS m_rnum
FROM master_table
-- WHERE ... -- any filtering goes here
, got_c_rnum AS
SELECT cont_id, updated_date, status
, ROW_NUMBER () OVER ( PARTITION BY cont_id
ORDER BY updated_date DESC
) AS c_rnum
FROM child_table
-- WHERE ... -- any filtering goes here
SELECT m.cont_id, m.seq_num, m.description
, c.updated_date, c.status
FROM got_m_rnum m
JOIN got_c_rnum c ON m.cont_id = c.cont_id
AND m.m_rnum = c.c_rnum
AND m.m_rnum = 1
;If you'd like to post CREATE TABLE and INSERT statements for the sample data, then I could test this.
If there happens to be a tie for the latest row (say, there are only two rows in the child_table with a certain cont_id, and both have exactly the same updated_date), then this query will arbitrarily choose one of them as the latest. -
Why cant i get the latest msnbc shows on itunes?
Why cant i get the latest video podcats from msnbc on itunes?
That is vague.
Are they not offered, or they are offered and you are not allowed to get them.
Please explain -
In mail how do I get the latest emails to appear at the top of the column automatically. At the moment I have to scroll up from the bottom oldest entires to find my latest mail arrivals
What device are you using?
I assume you are talking about something other than the iPad?
Is there a sort order above the date column? Clicking on this can switch between Ascending and Descending order. -
How to get the latest and valid BOM item entry from STPO
hi,
may i know with what condition we can get the latest and valid BOM item entry from STPO table?
i have STLNR and IDNRK as a input. But i realized that it would return multiple entry due to the combination of valid-from and valid till date.
can i use stlnr,idnrk and stpoz (with the latet counter) to get the latest and valid BOM entry?
thank you.Hi
You can get the latest BOM either by using the latest valid from date DATUV or latest internal counter STPOZ
Regards
Shiva -
How to get the latest version from DTR
Hi all,
I have all the latest code in my system 1 and i checkined the activites.Now i want all that code in my system 2.
Now i used sync from sources to get the lateset code.
But i am not able to get all the files and the build is getting failed.
Can any one plz help me out
Regards
Padma NHi,
Inorder to get the lateset version from DTR i used the procedure given by you.But at the second time if i want to get the lateset version from DTR wat to do??I didnt find the option of create project again because i already have to project in my workspace.
wat to do inorder to get the lateset source code from DTR 2nd time???
Regards
Padma N -
How to get the HTML Source code from the active browser ?
Hi All,
I need to get the HTML Source code from the active browser (IE). I tried with the below code, but I am not able to get the Source code all the time, with respect to the different applications (http or https) and the user authentication has to be changes in few applications (_I dont know or not able to given that in the below code_). More over there is also a dependence of the URL to get the HTML Source code.
Therefore what I feel is getting the HTML Source code from the given or active browser will be consistent than the URL. Since the Source code is available in the browser (IE) . Please help me with a sample code to achieve this . . . !
HTMLDocument doc=(HTMLDocument) kit.createDefaultDocument();
doc.putProperty("IgnoreCharsetDirective", Boolean.TRUE);
URL url = new URL(strURL);
Reader HTMLReader = new InputStreamReader(url.openConnection().getInputStream());
kit.read(HTMLReader, doc, 0);Thanks in advance,
Regards,
Jothi Venkatachalam
Edited by: j0o on May 7, 2009 3:11 AMThe simple answer is: you don't.
Not only is it simply not possible, but the entire concept of "the active browser" doesn't exist.
You were on the right track with your code to retrieve the page directly from the server, but as you noticed that code will only work for regular http connections.
For https and other protocols you will need to use appropriate libraries for each protocol. Something like Apache Commons can help you with that. There are networking libraries in there for a lot of commonly used protocols. -
Installed the CC updates yesterday. Downloaded pics from my Canon 70D in Camera Raw. Since the updates Bridge no longer recognizes them; advises me to get the latest update, which I have. Both Photoshop CC's recognize the pics, just not Bridge (thanks for having Photoshop now show thumbnails of CR pics). Any Ideas on how to fix?
Thanks for the link Jeff. Couldn't find any links on the Adobe site.
Even with that link though, I was still left puzzled as it didn't give multiple versions, just a 32 bit and 64 bit version.
I tried the 64 bit and it didn't work, so I assumed that was what had already been installed in the update.
Now installed the 32 bit version, and fingers crossed. At least it starts up now!
Cheers Russell F -
Hi am having issues with getting the list of users from the Active Director
Hi am having issues with getting the list of users from the Active Directory, can anyone help me with this!
Hi Jason,
Try this:
1. In Ultiboard select Tools>>Netlist Editor>>Pins, press the Delete button
2. Select all nets in the Select the Net to Delete dialog and then press the Delete button. This will clear all nets in the layout, don't worry all traces, parts are still on the design.
3. Go to Multisim and select Transfer>>Forward annotate to Ultiboard. This will add all nets that you removed back and it should fix the pin problem
Tien P.
National Instruments -
How to get the latest Change date and time of a M.O. from View VIAUFKST
Hi All,
I want to get the latest date and time of a M.O. from view
VIAUFKST. I have written the query like this...
SELECT AUFNR
AEDAT " Changed Date
AEZEIT " Changed Time
FROM VIAUFKST
INTO TABLE I_VIAUFKST
WHERE AEDAT >= W_LASTRUN_DATE
ORDER BY AEDAT DESCENDING.
but its not giving me right results... Pls help me out on this or suggest me the right approach to achieve the same...As this is very critical issue...
Advance Thanks and Points Gauranteed...
Suresh> SELECT AUFNR
> AEDAT
> AEZEIT
> FROM VIAUFKST
> INTO TABLE I_VIAUFKST
> WHERE AEDAT >= W_LASTRUN_DATE.
>
> IF NOT I_VIAUFKST[] IS INITIAL.
> SORT I_VIAUFKST BY AEDAT AEZEIT DESCENDING.
> READ TABLE I_VIAUFKST INDEX 1.
> ENDIF.
>
> The above statement is giving me different results...
> such as...
>
> 1. 30/11/2005 19:20:11
> 2. 29/11/2005 22:10:09
> 3. 30/11/2005 20:56:09
> 4. 28/11/2005 23:10:09
>
> by using the above SORT statement i am getting the
> fourth record as the latest, where as it should give
> me the third record....
>
> Please advise,
> Suresh.
Hi Suresh,
The reason why you are getting this result is because the system is interpreting the DESCENDING only for AEZEIT not for both. Change it to
SORT I_VIAUFKST BY AEDAT DESCENDING AEZEIT DESCENDING -
How to use FQL & Coldfusion to get the latest comments from the Facebook commentbox
Hi all,
I have a facebook commentbox on my website, now i want to get the latest comments so i can show them on the frontpage to encourage people to comment.
After searching the net for hours and hours i can't seem to find any real solution.
Does anyone already has something like this setup and like to share the insights?
Thanks!You can extract a date portion and assign to the variable and then compare with GETDATE()
Best Regards,Uri Dimant SQL Server MVP,
http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting:
Large scale of database and data cleansing
Remote DBA Services:
Improves MS SQL Database Performance
SQL Server Integration Services:
Business Intelligence -
Hello, trying to download the latest iTunes software version, a pop up comes with a "invalid signature" message. Try to do download only with the same results. I can buy and download from iTunes but can't get the latest version?
Transfer Purchases = iTunes > File > Transfer Purchases
http://support.apple.com/kb/HT1848 -
Reg: Getting the latest or last saved data from the table
Hi,
I'm having a table, which is getting updated whenever something is saved.
Now i want to get the latest or last saved details to be displayed or the details of the row with greatest Id.( i.e, the Id. will be greatest for the last saved)
please help me out with code to do this...
Thanks & Regards,
SureshHi Suresh,
This could be done either through the webdynpro or the back end function module itself.
If another field of type date/time is present in the table, u can save the current date and time along with the data in the table, and sort it in descending order of time. so that whenever u refresh the page the latest record is always in the first row,
if u want to do it through webdynpro, u can also sort the table based on the date so that u get the latest record that was saved.
Another solution is that u can maintain a serial number sort of thing the table which helps u identify the latest record
Hope this helps u.
Regards,
Poojith M V
Maybe you are looking for
-
What is possible in oracle9i which is not possible in sql database
Dear friends , pls explain me the advantages of oracle9i over sql thanks senthil
-
Hi, I have multiple functions in my moviescript, i want to call on them without having to create a script like this: on mouseWithin me moveLeft(pNum) end I have functions like moveLeft, moveRight, moveUp, moveDown etc. How can i use one script who wi
-
IMac got switched to Russian language
I have a friend across the country, 85 yrs old and she accidentally switched the language on her Mac (running Leopard) to Russian. I tried to change it back to English in the International System Preferences over iChat Desktop Sharing but we could no
-
How do I replace images in slideshow with retina resolution images?
When I use a retina.js script to replace .png images with @2x.png images in a slideshow, only the first image shown is replaced with retina res image. Is there a way to replace all?
-
Any Ideas For Flash Player Install problems?
I cannot get adobe Flash player to install on My MBP running Snow Leopard. It Starts to install but hesitates at from 80% to 95% then finishes but does not work. Help!!