How to calculate the date from sysdate
I try to get 12/09/2009-12:51:30 by subtracting the current date to sysdate.
I can get with this year, but I don't know how I can get to the date and the month preceding.
() Choose add_months (sysdate-36() of double) = 12/09/2010
Planned result 12/09/2010 13:23:30
Thank you for the help
I'm assuming that time is fixed if it is to see the example below.
SQL > select add_months (to_date (to_char(sysdate,'dd-mon-yyy') |)) (("" 12:51:30 ',' dd-MON-yyy hh: mi: ss AM "), - 36) prior_date
2 double;
PRIOR_DATE
-----------------------
12 - Oct - 2010 12:51:30
SQL >
Tags: Database
Similar Questions
-
How to read the data from a channel named in windows using labview
Hello
I need to read the channel named in windows data. The pipe is created by python by another application. This application post permanent data on the pipe. But I don't know how to read data using labview. is it possible to read the data from different application? If possible, how to start?
Thanks in advance
concerning
RJ
Hi Rolf,.
It's just, because of driving is not initialized completely, pipe read returns error 42, I added 2 seconds late, then its work perfect.
Thank you very much.
Concerning
RJ
-
How to separate the data from the reports
I wanted to ask, how to separate the data in a single page, in the left side of page 1and then the right side of the page 2
Thank you
my report layout.
you have to find the solution.
-
How to calculate the date interval
Hi Experts,
I'm looking for a way to calculate the interval between two dates. And get the result to the format "dd.mm.yyyy hh24:mi:ss.
Best practices for a problem like this?select sysdate - to_date('1.1.2000 12:00:00','dd.mm.yyyy hh24:mi:ss') from dual
Best regards
Igorselect trunc( months_between( day2, day1 ) / 12 ) years , mod( trunc( months_between( day2, day1 ) ), 12 ) months , numtodsinterval( day2 - add_months( day1, trunc( months_between( day2, day1 ) ) ), 'DAY' ) rest from ( select to_date( '19-01-1979', 'dd-mm-yyyy' ) day1, sysdate day2 from dual )
-
How to get the data from more than 100 domains in bulk API V2.0?
Hi all
I try to get data from Eloqua by APIs in bulk because of big data.
But my Contact 186 fields (more than the majority of export limitation 100). I think I need to get all the data by 2 exports.
How could I corresponds to 2 parts of a line and join together?
I'm afraid that any change of data between 2 relative to exports 2 synchronizations would make different order.
FOR EXAMPLE:
1. any document is deleted or modified (if it matches do not filter) after obtaining data of the first part and before getting the second part, then everyone behind it would have back in part result.
2. the data in some fields (included in both parts) are changed between the 2 synchronizations, then the values of the second part are more recent but the values of the first part are old.
All suggestions should.
Thank you
Biao
bhuang -
I don't know that you ever go to work around the fact that things will change in your database while you are synchronizing the data. You have to have a way to create exceptions on the side of the synchronization.
If I pushed Eloqua data to a different database and had to contend with the problem of matches change while I'm syncing, I would create a few additional columns in my database to track the status of synchronization for this folder. Or create another small table to track the data map. Here's how I'd do.
- I would have two additional columns: 'mapped fields 1' and '2 fields' mapped. They would be all two datetime fields.
- I would do only one set of synchronization both. First of all, synchronize all records for email + 99 fields. Do the entire list. For each batch, the datetime value of the lot in 'mapped fields 1' column.
- I would then synchronize all folders of email + other 86 fields. Repeat the entire list. For this batch of the datetime value of each batch in their 'mapped the 2 fields' column to now().
- For all records that had only 'mapped fields filled, 1' but' fields mapped 2' was empty, I would be re - run the second query Eloqua API using e-mail as the search value. If no results were returned, I would remove the line. Otherwise, update and the value 'mapped fields in 2' now
- For all the records that were only "fields mapped 2', I re - run against the first email query API Eloqua, fill in the missing data and define 'mapped the fields of 1' of the current datetime object." If the record has not returned, remove the line because it is probably not in the search longer.
- Finally, the value 'mapped fields 1' and 'mapped 2 fields' empty for all records, since you know that data is synchronized. This will allow you to use the same logic above on your next synchronization.
Who is? It is not super clean, but it will do the job, unless your synchronizations take a ridiculous amount of time and your great data changes often.
-
How to calculate the data according to the fiscal
I want to dispaly the result for the accounting year from April to March for any accounting year (Accounting year is from April to March). I have a table INVOICE. CREATE TABLE INVOICE ( IN_NO NUMBER, IN_DT DATE, IN_DETAILS VARCHAR2(20 BYTE) ) I want to calculate display the result for accounting year from April 2010 to March 2011, and from April 2011 to MArch 2012. What statement should i use to filter the data as above ? Sanjay
user12957777 wrote:
I want to dispaly the result for the accounting year from April to March for any accounting year (Accounting year is from April to March). I have a table INVOICE. CREATE TABLE INVOICE ( IN_NO NUMBER, IN_DT DATE, IN_DETAILS VARCHAR2(20 BYTE) ) I want to calculate display the result for accounting year from April 2010 to March 2011, and from April 2011 to MArch 2012. What statement should i use to filter the data as above ? Sanjay
You should now learn to use correctly
tags select to_char(add_months(in_dt,-3),'YYYY') FISCAL_YEAR FROM INVOICE;
-
How to copy the data from Palm Desktop on a PC running Windows 8.1
If like me you still find the Palm Desktop data (addresses, calendar, notes, etc.) handy and use it long after throwing the combined capacity and 'sync', you can see this is useful. I bought a new PC running Windows 8.1 and had problems with data transfer due to a problem as I understand it, which does not exist in Windows XP, Vista or 7 versions. Here is a summary of a way to easily transfer data from these earlier versions if you have a USB flash drive (or Dropbox, Google Drive, whatever) very convenient:
(1) Download Palm Desktop 6.2 or 6.2.2 to your new PC. Give a user name exactly as it exists in the database from your old PC. This name will serve as Office Automation to create a folder name of six letters (an abbreviated version of your name) to hold the data that Palm Desktop will turn upward. Wait a few seconds for this to happen, and then close the application on your new desktop.
(2) in your old PC you want to transfer data from, find the folder named "Palm OS Desktop" which should exist in 'Documents' under path of folder and subfolders 'Users' as > your subfolder name > Documents in Windows 7 (can also be Vista) or may be under "Documents and Setting" folder in Windows XP.
(3) in this folder "Palm OS Desktop" search this subfolder of six letters of your name and select this whole subfolder and select 'Copy' or Ctrl-C
(4) locate the same name of subfolder in your new PC (which will have data zero), delete and then 'paste' the subfolder you "copied" in the exact same location. If you did it right, Viola! Your new desktop PC should display all the transferred data, once you open the application again.
Most of the same procedure works with PC Windows 8.1 (probably also Windows 8). What I found different is that the subfolder of data created under "Palm OS Desktop} had 7 instead of 6 characters with a"0"(zero), added as the last character. When finally, you copy and paste this subfolder in the new PC there so rename and add "0" for the Palm Desktop to locate these data.
I hope this helps.
Data in XP is located in C:\Program Files\Palm (or PalmOne) \ < your HotSync name truncated > \Backup.
HotSync for Win8 has been available for quite a while now! See the post at the beginning of this section called "64-bit Windows USB drivers for Palm Desktop" for instructions and driver downloads.
Palm Desktop 4.x and 6.2.2 use different database formats - 6.2.2 went to .mdb as an extension.
Best way to migrate data is to perform a HotSync on the new machine, or use the built-in in Palm Desktop Export/Import option. Export the addresses and calendar files, and then copy those of the new machine.
The import option to retrieve data.
WyreNut
-
How to copy the data from the indicator table 1 d to the Clipboard
Is it possible to copy data from table 1 d indicator to the Clipboard as a text and for more than one cell?
I use LV8.6.
Leszek
Sorry, I wasn't sure if it was available in 8.6, apparently not.
You could create an indicator of fine print and use 'picture to a worksheet string' to complete. Now, you can just cut & paste the text instead.
-
How to insert the data from the table file?
I need to know that how can I insert data into multiple columns by file. I can simply insert data into a table of columns, but could not find a way to put the data in the column all.
My data in a file store
************************************************text.txt***************
133, nanny, nagina, 14 mph, 45637, 9156729863
**************************************************************my_data(table)**********
try to insert into table below...
Name, ID, last_name, add, PIN. Mob
*********************************************
Let me know if you need anything else... :))Hey nanny.
In fact, in SQL Developer, you can open a connection to the target schema, right-click on the Tables node in the Navigator tree, select import the data, then use the data import wizard. It is extremely flexible. Looks like you have a file of comma-separated variables, so if you select Format: csv and import method: Insert it will probably work fine.
To minimize the risk of errors during import, choose a limit value of preview so that the wizard can review the data type and the size of all columns in several lines of data as possible, and then examine the size/type of data for each column on the next page of the wizard and replace if necessary. For date columns, it is also important to choose the appropriate format mask.
Hope this helps,
Gary
SQL development team -
How to calculate the date fields while excluding Saturday and Sunday
Hi, I use Jdeveloper 11.1.3.4
I have an Oracle database and creates a table called holiday with 3 attributes:
user (VARCHAR)
(early)
end (date)
The idea is that you subtract the finish from the beginning and get a number of vacation days used. The thing is that the sum should exclude Saturday and Sunday.
Any way to do it?/* Formatted on 6/1/2011 7:57:32 AM (QP5 v5.149.1003.31008) */ WITH t AS ( SELECT id, MAX (strt) strt, MAX (finish) finish, SUM (dys) days_off FROM (SELECT id, strt, finish, CASE WHEN TO_CHAR (dy, 'day') LIKE 'saturday%' THEN 0 WHEN TO_CHAR (dy, 'day') LIKE 'sunday%' THEN 0 ELSE 1 END dys FROM vacations MODEL PARTITION BY (ID id) DIMENSION BY (0 d) MEASURES (POCETAK strt, KRAJ finish, POCETAK dy) RULES (dy [FOR d FROM 1 TO finish[0] - strt[0] INCREMENT 1] = (NVL (dy[CV () - 1], dy[CV ()]) + 1))) GROUP BY id ORDER BY id) SELECT t.id, t.strt, t.finish, t.days_off, vacations.korisnik, SUM ( CASE WHEN finish < TO_DATE ('01/07/2011', 'dd/mm/yyyy') THEN days_off ELSE 0 END) OVER (PARTITION BY vacations.korisnik ORDER BY t.id) this_years_running_total, SUM ( CASE WHEN finish < TO_DATE ('01/07/2011', 'dd/mm/yyyy') THEN days_off ELSE 0 END) OVER (PARTITION BY vacations.korisnik) this_years_grand_total, SUM ( CASE WHEN finish >= TO_DATE ('01/07/2011', 'dd/mm/yyyy') THEN days_off ELSE 0 END) OVER (PARTITION BY vacations.korisnik ORDER BY t.id) next_years_running_total, SUM ( CASE WHEN finish >= TO_DATE ('01/07/2011', 'dd/mm/yyyy') THEN days_off ELSE 0 END) OVER (PARTITION BY vacations.korisnik) next_years_grand_total FROM t, vacations WHERE t.id = vacations.id
id strt finish daysoff korisnik thisyrruntot thisyrtot netyrruntot nextyrtotal 1 5/25/2011 5/31/2011 5 Kantardzic 5 22 0 26 2 6/6/2011 6/13/2011 6 Kantardzic 11 22 0 26 5 6/1/2011 7/6/2011 26 Kantardzic 11 22 26 26 6 6/16/2011 6/30/2011 11 Kantardzic 22 22 26 26
-
How to change the data from the database and displayed in a DG
Hello, it's me again with a simple question:
I received the request of SQLi that returns multiple lines.
In this line, I have for example:
Reward-> 1
How, instead of show 1 in the data grid, change this value to 'YES '.
I followed this thread:
private void onResultStats(event:ResultEvent):void
{
ServerStatsArr = new ArrayCollection (event.result.source);
for (var i: int = 0; i < ServerStatsArr.length; i ++)
{
If (.abonnement ServerStatsArr [i] == 304) {}
ServerStatsArr [i] .abonnement = 'Premium ';
} else {}
. Subscription ServerStatsArr [i] = 'no ';
}
If (ServerStatsArr [i] .transparence == 1) {}
. Transparency ServerStatsArr [i] = 'yes ';
} else {}
. Transparency ServerStatsArr [i] = 'no ';
}
}
ServerStatsArr.refresh ();
}
Why this method works for the subscription when (.abonnement ServerStatsArr [i] == 304) he displays Premium, but it does NOT work for transparency ?
I tested (.transparence ServerStatsArr [i] == 1) and (.transparence ServerStatsArr [i] == '1')
Thank you
Hi again,
private void setLabel(item:Object,column:DataGridColumn):String
{
Switch (Column.DataField)
{
case 'transparency ':
If (item.transparence is "1")
return ('yes')
on the other
return ('no')
break;
case "subscription":
If (item.abonnement is "304")
return ("premium")
on the other
return ('none')
break;
by default:
Return("");
}
}
and your grid adjustments - add the labelfunction to the following topicsI hope we get a credit of distinction for this mission...David. -
BlackBerry smartphones, I don't know how to get the data from the phone to the computer
I have the Desktop Manager and the telephone connected to the cable.
He seems to have only coices I want. I don't want is a full backup or restore or synchronoizing or send anything to the phone.
I want to just do a few simple things:
(1) I want to copy pictures from my phone to my computer, that I can see with the standard Windows software.
(2) I want to copy my address book from my phone on my computer, that I can see with some standard desktop application, any.
(3) I want to copy my calendar so I can see it with some standard desktop application, any.
How can I get them?
Thank you
Hi and welcome to the Forums!
JustCurious wrote:
(1) I want to copy pictures from my phone to my computer, that I can see with the standard Windows software.
See this:
JustCurious wrote:
(2) I want to copy my address book from my phone on my computer, that I can see with some standard desktop application, any.
(3) I want to copy my calendar so I can see it with some standard desktop application, any.
See these:
KB12268 Applications supported by BlackBerry Desktop Manager to synchronize
KB17022 How to set up BlackBerry Desktop Manager synchronization settings
Good luck and let us know!
-
How to extract the data from each row
Hello
I wrote a CQL query with lines 3 records. Is it possible in this query to fetch the first record and last present specific field values.
for example,.
Column: c1, c2, c3
Record1: id1, 2,3, 3.5
Record2: id2, 2.3, 3.6
record Record3: id21, 2.3, 3.7
record Record3: id25, 2.3, 3.9
I need to get the average of three rows of c3 and get the first record id and last record ID.
Output 1: id1 id1, avg (c3) = 3.5
output2: id1, id2, avg (c3) = 3.55
Output3: id1, id21, avg (c3) = 3.6
output4: id2, id25, avg (c3) = 3.733
Please help on above.
Thank you
SriHello
Not quite sure that understand what is the problem that you see.
Here's what I got when I ran the query:
Input data:
C1, c2, c3
ID1, 2,3, 3.5
ID2, 2.3, 3.6
id21, 2.3, 3.7
ID25, 2.3, 3.9
DELAYED26, 2.3, 4.0
ID27, 2.3, 4.1Query:
Select T.firstC1, T.lastC1, S1 T.avgC3
() match_recognize
measures
First (M1. C1) as firstC1,
M2. C1 as lastC1,
AVG (C3) as avgC3
all matches
model (A B? C ? | D + C)
subset m1 m2 = (A, B, C) =(A,D)
define
At as prev (A.c1) is null.
B as (count (*) = 2),
C as (count (*) = 3),
D like ((prev (D.c1) is not null) and (count (*))<>
) tOutput:
firstc1, lastC1, avgC3
ID1, id1, 3.5 - avg only trace
ID1, id2, 3.55 - avg from two records
ID1, id21, 3.6000001 - avg from three recent reviews
Id2, id25, 3.7333336 - avg from three recent reviews
id21, delayed26, 3.8666668 - avg from three recent reviews
ID25, id27, 4.0 - average last three book reviewsThis output confirms with you that mentioned the expected results?
Can you please run this query as it is on the above mentioned input data and check by yourself?
If you don't get the desired result, please paste the input data provided, complete the text of the query and the outputs.Concerning
-
How to copy the data from the CLOB on Varchar2?
Hi all
I have a CLOB field with data, I want to copy all the ot its data to another field of varchar2 to the same table. How, please?
I think that I should use the Update statement, but how?
Note: Iam using DB Oracle 10g R2You can just do a simple UPDATE, but if you have the adta in your CLOB which is too big to fit in your column VARCHAR2 column, you will not be able to get it all:
UPDATE my_table SET my_varchar2_column = SUBSTR(my_clob_column,1,[size of my_varchar2_column];
-
C = 14.65 GB, 18.30 MB available
D = 59.87 GB, 49.82 GB available.E = 37,34 GB, 36.40 GB available.Create a folder in my music, photos, etc., move all the files in each of
the new folder, once completed, switch to the other disk. As far what will other data, like
3rd party software that is not part of the operating system, you must install it to another
drive, uninstall, reinstall after pc reboot...
If drive D: E: F: & is actuall hard disks, not partitions, install data &
software for them is a good performance upgrade, otherwise, its purpose is
marginal... For more information, try this link.
http://www.Microsoft.com/mspress/books/sampchap/6559.aspx#106
Or this link.
Maybe you are looking for
-
Recently I started having trouble with sending an outgoing message. Beyond out lickety split with no problem. Now, once I click on SEND, I get window to send the Message reading "status: connected to stmp.primus.ca...» "but the progress bar continues
-
Why "open all in tabs" removes my all current browsing session?
I went into my favorites and choose "open all in tabs" for a particular folder. It opens all links in new tabs, all right - but it closed each tab, I had already opened and did not spare the session. Really, it is massively frustrating and stressful
-
Where I would get an update of the graphics for Compaq Presario 2000 XP driver?
Where can I update the driver for compaq presario 2000 graphics card, windows xp?
-
Hello I want to improve the MEM on my ESXi hosts, so I followed the doc tech "configure and install the plug-in of Multipathing equallogic." On my vMA, I've replaced the setup.pl and dell-eql-MEM files with the new ones, using WinSCP. Now when I try
-
want to turn off highlight the particular list field line, when you click
Hello I have a list of line 3 display, on which I have 2 lines that are highlighted with little color. When I click on the particular line, I want to turn off the highlight on this line. How can I remove the list and add to the list to turn off highl