How to get unpaid balance 30 days from date selected
Hi allI have to get the UPB (outstanding balance) of the table every day and I need to check the UPB of last month. There are daily and monthly tables separate. And according to the user enter the range of dates as the value of the setting that I need to get the monthly table.
for example if the user enters the date range 01/08/2011 to 15/08/2011 while I check for the month of July monthly table to get the month previous UPB.
Help, please
Thank you
Have you tried the add_months function?
This would allow you to find the date of one month before the given value, then you can truncate to get the previous month. I have not tested, but I guess that the code would be something like as below:
select trunc(add_months(to_date('15-08-2011','dd-mm-yyyy'),-1),'MON')
from dual;
01-JUL-11
I don't know the layout of your tables, but I hope it helps.
Kerri
Published by: Kerri_Robberts on August 17, 2011 17:14
Tags: Database
Similar Questions
-
Hi there is a balance of $20 showing on my Itunes account, however I don't seem to be able to use it to download a movie to rent.
Can someone tell me please how to get this balance...
What happens when you try to rent the movie? If you use a family sharing and that you are the family Organizer so you won't be able to use your balance.
-
How to get the balance of an element value
Hello
I have a requirement to obtain related information with balance. I am able to read the information on the element except balance.how to get the value of the particular item balance.
for the application-> transfer and process-> queries with trust-> value the month selected and chosen balances button and queries with the obtained item name break it down the value of the balance.
These values I want in my query.i tried backend with calling package by passing parameters like the number of transfer, balance the id and date but iam getting value "0".
IAM new to hrms, Please help me on how to get this balance of values
Thank you
Hello
It is not very clear what you want to display in the form of balance for a given range of dates.
It depends on how you have configured your balances and periods and balance which you are referring.
The API allows for a given only date that matches the date earned.
Say, for example, that you have a "basic salary" defined with a "Treatment period assignment to Date" dimension and feed of the element that corresponds to the base salary.
"If you need get the 'wage base Total' (balance?) for the period February 1, 2015 ' to March 31, 2015", then you need get dates earned for payroll passes made during that period and call the package above with the appropriate settings.
Another way is by querying the tables/views directly: you can use, for example - it's perhaps easier to your situation:
Select sum (nvl (pbv.value, 0))
of pay_balance_values_v the VB.
where pbv.balance_name = 'base salary.
and pbv.database_item_suffix = '_ASG_PTD. '
and pbv.assignment_id =
and pbv.effective_date between to_date (' 01/02/2015 ',' dd/mm/yyyy')
and to_date (' 31/03/2015 ',' dd/mm/yyyy');
Kind regards
Rajen -
How to get LASTDAY for each month between data dates...
Hi friend
I have a doubt, how to get LASTDAY for each month between data dates...
for ex:
My contribution will be like this
date = 01/12/2011
To date = 14/04/2011
And I need an output like
31/01/2011
28/02/2011
31/03/2011
is it possible to achieve through sql query in oracle
Thanks in advance for all friends to help himHello
Something like this (assuming that the dates are originally VARCHAR2s):
SQL> var dt_start varchar2(10) SQL> var dt_end varchar2(10) SQL> exec :dt_start := '12-01-2011' PL/SQL procedure successfully completed SQL> exec :dt_end := '14-04-2011' PL/SQL procedure successfully completed SQL> SQL> select last_day( 2 add_months( 3 trunc(to_date(:dt_start,'DD-MM-YYYY'),'MM'), 4 level-1 5 ) 6 ) as result 7 from dual 8 connect by level <= months_between(to_date(:dt_end,'DD-MM-YYYY'), to_date(:dt_start,'DD-MM-YYYY')) 9 ; RESULT ----------- 31/01/2011 28/02/2011 31/03/2011
If the dates are already of the date data type, simply remove the to_date function.
-
How to get the files to and from the host
Is there something that I can read which explains how to get the (ftp, memory stick or other) files to and from the host?
Sorry if this is a noob question, I looked but could not find something specific...
There are many ways of doing so:
1 activate not supported ssh and scp use
2. use VI Client access to your storage space on configuration files and server transfer
3 configure the iSCSI or NAS to deal directly
-
How to remove tabs, several spaces, quotes from data in the column.
Hello
How can we remove legs, several spaces, quotes from data in the column.
Entry:
H ope you 'are' Ingo w ell
Output:
H ope do you everything - there is a tab in hope and double-spaced in the well. This should be replaced by space. (Tab and multi spaces)
I found myself with below:
REGEXP_REPLACE (REGEXP_REPLACE (Replace (col, Chr (9),' '), ' () {2,} ', ' '),'[' ""]', ")
Can we do more efficiently, your contributions are appreciated.
I tried
REGEXP_REPLACE (col,'[^ [a - z, A - Z, 0-9, Chr (0) - Chr (127) [: Space:]]] *', ") but the tabs still exist and that my data have German characters I can't go along with this.
Thank you
GVK.
Hello
Karthik417 wrote:
Hello
Thanks for your suggestion. In the above expression, we still missed to replace the double quotes.
So thought we must use another regular expression instead of REPLACE.
Select REGEXP_REPLACE (REGEXP_REPLACE (' H ope you "are" d "Ingo ell w ',' [' |])) CHR (9) | + ',' '),'["" "]') twice;
I suppose we must use at least 2 REGEXP to achieve and cannot get it with a single expression.
Thank you
Sorry, I removed single quotes, not double - quote. (This shows one of the reasons why having a few lines of sample data is very useful).
I think you don't need 2 separate functions. I do not think that the two must be REGEXP_REPLACE; You can use TRANSLATE to remove both types of quotation marks in a single function call:
TRANSLATE (REGEXP_REPLACE (col
, '[ ' || CHR (9) | ']+'
, ' '
)
, '?'''"',
, '?'
)
Of course, you can use use REGEXP_REPLACE to remove the quotes, if you really want to.
Powerful they are, regular expressions are basically only 1 thing, things not 2 or more different. Sometimes, he can watch as they do several things, because they can operate on character classes, like the series containing the
and the and a variable number of characters. For example, the REGEXP_REPLACE function, I used above is simply changing expression expression x y, where x is 1 consecutive or more characters of a given set. As we both demonstrated, we can have a separate function that changes from p to q, but I know not all built-in function which, in general, can change x to y at the time that it changes from p to q. TRANSLATE comes close, but TRANSLATE only works if x, y, p and q are single (or NULL), characters not expressions. -
How to get the primary key of the node selected in af:tree
Hi all
I use JDeveloper 11.1.1.5.0.
I want to get the primary key of the node selected in the af:tree element. I wrote the code below in SelectionListener:
The result looks like this:public void drzewkoRwaSelectionListener(SelectionEvent evt) { RichTree tree = (RichTree)evt.getSource(); TreeModel model = (TreeModel)tree.getValue(); RowKeySet rowKeySet = evt.getAddedSet(); Object key = rowKeySet.iterator().next(); model.setRowKey(key); System.out.println(rowKeySet); System.out.println(rowKeySet.size());
I need the values of the last 2 nodes:[[oracle.jbo.Key[5 ], oracle.jbo.Key[6 ], oracle.jbo.Key[12 ],oracle.jbo.Key[14 ]]]] 1
1: oracle.jbo.Key [14]
2: oracle.jbo.Key [12]
How can I get?
Kind regards
Wojtek.Hello
Try this code:
{} public void drzewkoRwaSelectionListener (evt SelectionEvent)
RichTree tree = (RichTree) evt.getSource ();
Model TreeModel (TreeModel) = tree.getValue ();
RowKeySet rowKeySet = evt.getAddedSet ();
Key of the object = rowKeySet.iterator () .next ();model.setRowKey (key);
System.out.println (rowKeySet);
System.out.println (rowKeySet.Size ());Object [] keys = rowKeySet.toArray ();
List (list) = keys [0];
Keys = list.toArray ();
* //from the table keys, you can get according to the value you want using as: [2], [3] key *. -
How to get the default path of the data of a table space file
I used below the sql statement to create a table space:
CREATE A TABLESPACE DATAFILE AAA BBB SIZE 10 M AUTOEXTEND OFF...
Notice, I do not give a full path instead of a file name, and then ask questions relevant to tables
get the full path of the data file, assume that it's path below:
d:\oracle\...\BBB
So I don't think that there is a default path that oracle can use it to create the data file. My question
is how to get this default path before creating a table space.
Thank you very much.
Hello
I did similar simulations for you, then it could be seen easily:
SQL > Show parameter db_create_file_dest
VALUE OF TYPE NAME
------------------------------------ ----------- ------------------------------
db_create_file_dest chain
SQL > SELECT NAME, VALUE OF V$ PARAMETER
2 where lower (name) = "db_create_file_dest;
NAME
--------------------------------------------------------------------------------
VALUE
--------------------------------------------------------------------------------
db_create_file_dest
It has the value NULL. Then where my datafile is going?
SQL > create tablespace TEST datafile 'test01.dbf' size 10 M;
Created tablespace.
SQL > select file_name
2 of dba_data_files
3 where nom_tablespace = 'TEST ';
FILE_NAME
--------------------------------------------------------------------------------
/U01/app/Oracle/product/12.1.0/Db_1/DBS/Test01.dbf
When you check the alert logs, it will not show you the location of the data file. It will tell you what exactly you ran.
..
..
Completed: drop tablespace test whose content and data files
create tablespace datafile 'test01.dbf' size 10 M TEST
Completed: create tablespace TEST datafile 'test01.dbf' size 10 M
..
..
You can not SQL user * more? Well, I would say that, when you run the CREATE TABLESPACE command, is where you run the command:
SQL > select file_name
2 of dba_data_files
3 where nom_tablespace = 'TEST ';
FILE_NAME
--------------------------------------------------------------------------------
/U01/app/Oracle/product/12.1.0/Db_1/DBS/Test01.dbf
So, you should get the location of your data file. Alternatively, you can run the query in the parameter $ v so that you know your default data file location.
I hope this helps.
Thank you.
Kind regards
Gaetan
-
How to get no value zero to a data set
Here is my SQL statements:
WITH T1 AS (SELECT 'i1' ITEM, 'L1' LOC, SYSDATE - 7 DAT, 0 QTY FROM DUAL UNION ALL SELECT 'i1' ITEM, 'L1' LOC, SYSDATE DAT, 100 QTY FROM DUAL UNION ALL SELECT 'i1' ITEM, 'L1' LOC, SYSDATE + 7 DAT, 0 QTY FROM DUAL UNION ALL SELECT 'i1' ITEM, 'L1' LOC, SYSDATE + 14 DAT, 20 QTY FROM DUAL UNION ALL SELECT 'i1' ITEM, 'L1' LOC, SYSDATE + 21 DAT, 10 QTY FROM DUAL UNION ALL SELECT 'i1' ITEM, 'L1' LOC, SYSDATE + 28 DAT, 0 QTY FROM DUAL UNION ALL SELECT 'i2' ITEM, 'L2' LOC, SYSDATE DAT, 0 QTY FROM DUAL UNION ALL SELECT 'i2' ITEM, 'L2' LOC, SYSDATE + 28 DAT, 0 QTY FROM DUAL UNION ALL SELECT 'i3' ITEM, 'L3' LOC, SYSDATE DAT, 10 QTY FROM DUAL UNION ALL SELECT 'i3' ITEM, 'L3' LOC, SYSDATE + 28 DAT, 0 QTY FROM DUAL UNION ALL SELECT 'i3' ITEM, 'L3' LOC, SYSDATE DAT, 230 QTY FROM DUAL) SELECT * FROM t1;
Current output
Expected results:
Logic:
For a point order and the particular location by date (ascending order) first non - zero qty column should be filled with zero qty column
for example,.
For i1 and Loc l1 point, we have 6 entries and Jan 07, Jan 21st and Feb 11 we have zero quantities and Jan 14th, 28 Jan and Feb 04 have non - zero quantities, when all of this is stopped by date, amount of 14 Jan must stem from Jan 07, Jan 28 should be established on 21st January and Feb 11 is to have zero quantity but there is no record found after that if she should remain such what.
Similar logic for all other combinations
What I tried: I tried to realize using first_value analytic function that is not just my output
Thank you for your help in advance
It is a bit of a hack, but how about...
-case when qty = 0 then nvl (lead (decode (qty, 0, to_number (null), qty) ignore nulls) over (partition by element, loc in order of dat), 0) other end qty
-
How to get the ip address of the data storage device
Hi all
I developed a project now and you need to distinguish a virtual machine is saved to the device local ESX or remote network storage device.
I found the data store object in which the virtual machine resides by vi sdk, but could not find the address of the device that includes this data store.
How to get the ip address of the coding data storage device, which includes the virtual machine? I need your help.
Thank you in advance.
How do you try to make a query. Storage devices provides a logic unit number no, there is no IP address for it.
You can check the same for the storage on vCenter view
-
How to get out the year following the date
Hi all
I'm couldn't get out of the year to date.
in my table it has been stored in varchar format on January 11, 2005
If I want to display the year of the column, then
I tried with year (to_date (' ' jan 11 2005 ', ' mm dd yyyy ' "))
but I get an error then, how should I go out the year of the date_column
thnksHello
Use RIGHT(DATE_COLUMN,4)
Thank you
Saichand.v -
How to get the content of the list item selected ListView using CPP?
Hello
I do a simple application, get the content of the list item selected ListView using CPP, in the main.qml file, I created a listview using XMLDataModel and I got the selected listview using dataModel.data (row) .attributeNameInXmlfile in qml. content as in the same way the ListView using cpp.please help me I want to get the content of the listitem selected.
Here is my code
hand. QML
import bb.cascades 1.0 Page { content: Container { id: mainContainer objectName: "container" // property alias selectedText: selectedTextField.text //property alias deselectedText: deselectedTextField.text ListView { objectName: "listView" dataModel: XmlDataModel { source: "models/items.xml" id: model } listItemComponents: [ ListItemComponent { type: "item" StandardListItem { title: ListItemData.title } } ] } TextField { id: selectedTextField objectName: "selectedTextField" text: "" } TextField { id: deselectedTextField objectName: "deselectedTextField" text: "" } } }
App.cpp
#include "app.hpp" #include
#include #include #include #include #include using namespace std; using namespace bb::cascades; QObject *textFieldSelected ; QObject *textFieldNotSelected; QObject *list; App::App() { QmlDocument *qml = QmlDocument::create("main.qml"); AbstractPane *root = qml->createRootNode (); list = root->findChild ("listView"); textFieldNotSelected = root->findChild ("deselectedTextField"); textFieldSelected = root->findChild ("selectedTextField"); QObject::connect(list,SIGNAL(selectionChanged (QVariantList, bool)),this,SLOT(changeText(QVariantList, bool))); Application::setScene(root); } void App::changeText(QVariantList indexPath,bool selected) { } App.HPP
#ifndef APP_H #define APP_H #include
#include #include /*! * @brief Application GUI object */ class App : public QObject { Q_OBJECT public: App(); public slots: void changeText(QVariantList ,bool ); }; #endif // ifndef APP_H Try this.
void App::changeText(QVariantList indexPath,bool selected) { XmlDataModel *model = (XmlDataModel *)list->dataModel(); QVariantMap map = model->data(indexPath).toMap(); // map is your data in QVariant qDebug() << map["title"].toString(); }
-
How to get the computer to boot from a USB?
I use offline windows Defender. Start the computer to the USB you need. How can I get the computer set up to do this?
my computer is a HP Pavilion e9100z.
Thanks for any help
Hello
We will determine if your PC can not even boot from USB devices. Plug the USB and turn on your PC. When you get to the HP splash screen, then start typing the escape key to bring up a boot selection menu. If you do not see the USB device then your PC can't boot from a USB device.
If your PC does support booting from a USB device and then read this MS post article.
You always have the option to start Windows Defender from a CD or a DVD.
-
How to get the Installation of Vista from Toshiba disk?
I work with Microsoft technical support to solve a security problem on my Satellite Pro A210 and were now required to use a Vista installation disc.
Microsoft says that I am entitled to an installation of the original provider of my kit disc - Toshiba. But we're not happened with my laptop - only a recovery disc has been provided.
How can I go on the acquisition of an installation of Vista from Toshiba disk?
Kind regards
Kevin C.
With Toshiba laptop, you'll get the Toshiba CD/DVD facilities only.
This recovery media is designed for your laptop only.Installations from Microsoft Vista disc is not given and there is no way to get it from Toshiba.
Microsoft can offer that you support if you only use Microsoft installations CD. Using this disk, you can install and repair Vista on each portable office/computer option. Unfortunately with the restore disc it will not work.
-
Hai bloggers,
See us have 365 days a year for all first half we'll have 180 + days (if we choose first half as the guest and we select week as guest number and the last date of this particular week must indicate in the report) and the number of days until this date or a week should also display... If we choose the second half and half week number it should show number of days until this week and more Date of this issue of the day week should be from 1 to 180 + only way (July 1 m is 1)
Thank youYou must use the timestampdiff function to calculate the number of days. One of the way to calculate is how
cases where "Time". "" Calendar semester "= 1 then timestampdiff (SQL_TSI_DAY, CAST (EVALUATE ('TO_DATE (%1, %2)','' 01-01 |' @{YEAR} {2010}',"DD-MM-YYYY") AS DATE), cast OFF (EVALUATE ('TO_DATE' (1%, 2%), 30-06' |' @{YEAR} {2010}',"DD-MM-YYYY") AS DATE)) else timestampdiff (SQL_TSI_DAY, MOUNT (EVALUATE ('TO_DATE (%1, %2)','01-07' |' @{YEAR} {2010}',"DD-MM-YYYY") AS DATE), cast OFF (EVALUATE ('TO_DATE' (1%, 2%),' 31-12 |' @{YEAR} {2010}',"DD-MM-YYYY") AS DATE)) end
If you want to calculate between the 1st day of the half and the last date a week then after
cases where "Time". ' ' Calendar semester ' = 1 then timestampdiff (SQL_TSI_DAY, CAST (EVALUATE ('TO_DATE (%1, %2)','01-01' |' @{YEAR} {2010}', 'DD-MM-YYYY') AS DATE), MAX (MAX ("Time".) "Calendar Date"))) else timestampdiff (SQL_TSI_DAY, CAST (EVALUATE ('TO_DATE (%1, %2)','01-07' |' @{YEAR} {2010}', 'DD-MM-YYYY') AS the DATE), MAX (MAX ("Time".) " End Calendar Date")))
Hope that it will answer your question
Thank you
Phani.
Maybe you are looking for
-
The only apple tv is available currently is the 32 MB, is that sufficient or should I wait for the 64? Is there really that much difference between the two?
-
Why is it so hard to get this browser to simply open new tabs in google?
Google is defined as home page under general settings, Google is in the browsernewtab.url, Include suggested sites is unchecked, and this thing opens nevertheless each new tab to this darn annoying screen with tiles everywhere. This ignorance began o
-
Satellite C650D-006 - how to maximize the battery life?
I have just bought a laptop C650D/006 and I was wondering what is the best way to maximize the battery life. In other words, if I use it with the power cable plugged AC will be keeping the battery installed the result of all the time a decrease in th
-
My 7410 faithful had staarted printing VERY slow
My HP 7410 faithful began unusually slow printing. It seems to be printing line with 10 seconds between the lines. I "think" there was a recent update from HP... but I'm not sure. It doesn't matter if I'm printing from the PC... or using the Panel c
-
Ok. Its been 2 weeks that I have sent my laptop for them to fix it. I had a warranty. Now my said status of customer waiting. Awaiting customer Action even mean? The deilvery estimate was today but it isn't here. Why? What it means? Why is it so slow