Emulating MS Office NETWORK DAYS Function
Oct 29, 2010
The MS Office 'NETWORK DAYS' function allows you to subtract one date from another and return the number of 'workdays' between them. So it ignores Sat & Sun. There is an additional parameter that allows you to ignore holidays as well.
I'd like to subtract a 'Request Date' from SYSDATE and get just the number of 'workdays'.
View 3 Replies
ADVERTISEMENT
Mar 13, 2009
how do i can make oracle function for the following vb6 function.
This function is used for calculating working days between two date.
****************************************
Public Function Work_Days(BegDate As Variant, EndDate As Variant) As Integer
' Note that this function does not account for holidays.
Dim WholeWeeks As Variant
Dim DateCnt As Variant
Dim EndDays As Integer
On Error GoTo Err_Work_Days
BegDate = DateValue(BegDate)
EndDate = DateValue(EndDate)
WholeWeeks = DateDiff("w", BegDate, EndDate)
DateCnt = DateAdd("ww", WholeWeeks, BegDate)
[code]......
View 3 Replies
View Related
Mar 17, 2011
I have a query that uses a function to find the business days between two dates.It sums the total number of days between two dates per employee to find the total days for the past 30, 90, or 365 days.
The problem is that the query takes 21 second to return the last 30 days.Over 70 second to return the last 90 days and over 140 second to return the last 365 days.Do you know how I could tune the query to return faster? Below is the query for the last 30 days:
select dwt_emp_id, SUM((SELECT GET_BDAYS(DWT_DATE,DWT_CREATE_DATE) FROM DUAL))
from dwt_dvt_work_time where dwt_create_date > sysdate - 30
and dwt_hours > 4 and dwt_usr_uid_created_by <> -1 group by dwt_emp_id order by dwt_emp_id
Here's the function:
CREATE FUNCTION get_bdays (d1 IN DATE, d2 IN DATE)
RETURN NUMBER
IS total_days NUMBER(11,2);
holiday_days NUMBER(11,2);
[code]....
View 1 Replies
View Related
Feb 17, 2010
I want Oracle stored function/procedure to calculate number of working days between two dates. We need to exclude Firdays and Saturdays as there are weekend holidays and also exclude official holidasy that lie between two dates.
View 7 Replies
View Related
May 14, 2012
Toad provided real nice output in a script format for a user if you want to copy it to another name user.
CREATE USER USER12
IDENTIFIED BY <password>
DEFAULT TABLESPACE USERS
TEMPORARY TABLESPACE TEMP
PROFILE DEFAULT
ACCOUNT UNLOCK;
-- 2 Roles for USER12
GRANT DEVELOPER TO USER12;
[code].....
Does a sample query can produce this output? what tables I can get this informaition from. I know one of the tables is dba_users
View 16 Replies
View Related
Sep 2, 2011
I have installed Oracle Database 11g.2 by database configuration assistant on windows XP as and adminstrator on my laptop(no connection to network),but when I want to create database I face this warning: error securing database control ,Datatbase control has been brought up in non-secure mode . to secure the database conntrol execute following command....(error is attached).
View 7 Replies
View Related
Apr 5, 2011
want to write Procedure to return weeks and days from given set of days.
let suppose we have 72 days to return weeks and days then return should be 7 weeks and 2 days.Can i use date function Or ?
View 5 Replies
View Related
May 26, 2012
I download a pdf file,but I want to use it in the office word,who knows how to convert it?
View 11 Replies
View Related
Nov 1, 2012
I need a query to display the office and count(*)
where rownum > 6 i.e
here is the data
office
------
hq
hq
hq
hq
hq
hq1
hq1
[code]....
I need a query to display the top 3 counts and the 4 row should be sum of count of other offices.
my result should look like this
office count(*)
--------- --------
hq 5
hq1 4
hq2 3
other 10
View 4 Replies
View Related
Jul 10, 2011
I am trying to read/write Open Office scalc.exe(which is replacement of Excel file) file using DDE Package as like Excel File. But it is giving me non oracle Exception Error when it focused or initiate.
View 2 Replies
View Related
Jun 18, 2012
I am trying to export data into excel (office 2007 and above- .xlsx) using the calls mentioned below, but i am getting an error. i am able to upload data and open the document in IE succesfully using office 2003 format(.xls)
The following are the calls made in the package and it works for .xls format
OWA_UTIL.MIME_HEADER('application/vnd.ms-excel');
The following are the calls made in the package and it is not working even thow i can see that the document getting opened .xlsx format
OWA_UTIL.MIME_HEADER('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
And i alos added the call in the httpd.conf file in Apache/windows server 2003
AddType application/vnd.openxmlformats .docx .pptx .xlsx
View 1 Replies
View Related
May 26, 2010
How to Print Customer Copy / Office Copy in rports 6i for example i want to print two copies of any report i want that on first copy of report shows CUSTOMER COPY and second copy of shows OFFICE COPY and report may be on multiple pages.
View 1 Replies
View Related
Jan 21, 2013
I have this pdf (2 Volumes) from Oracle University courses, "Oracle Fusion Middleware 11g: Build Applications with Oracle Forms" In order to read the examples you must have "Summit Office Supply Schema" fmbs, mmb, pll, tables.(dmp)
indicatively some tables (not confuse it with other summit user)
customers,
departments,
warehouses,
orders,
employees,
order_items,
product_information,
inventories
View 2 Replies
View Related
Apr 12, 2013
need to know how to connect remote database (ie my office oracle database) from my personal laptop. Using TOAD Software. me with the step by step procedure, and what software's I have to download.
View 26 Replies
View Related
Jul 3, 2010
Suppose my oracle database server IP is 128.1.1.100 in the office & the internet static IP is 115.118.33.100 is on that server. I want to retrieve the data by using oracle forms & report from my home's computer having different internet IP 115.118.33.25 on my home's computer.
what would be the settings on my home's computer for the same. i mean tnsname.ora file or any other setting.
View 5 Replies
View Related
Feb 18, 2011
I was considering a solution to maintain a replicated copy of a database in a remote office. However we are using SE One edition of oracle, so native support for dataguard is not available. There definitely should be some scripting solutions for this task, but I can't find any to date.
View 7 Replies
View Related
Jul 6, 2010
I m trying to open Report in Microsoft Office Excel format with below code.
declare
v_report_nameVARCHAR2(100) := 'F:IrfanNewReportsCurrency.rdf';
v_formatVARCHAR2(12):= 'SPREADSHEET';
begin
Web.Show_Document([URL]......);
end;
when my report run I received one message window File download after that this below error window appear & data can't show in proper format.
View 2 Replies
View Related
Feb 23, 2013
I have two tables emp , emp address as below
emp table :
emp_id emp_name,
1 rajesh
2 suresh
emp address table :
emp id emp_addresstype emp address
1 O kukatpally
1 H Hitech
2 O Kolkata
2 H hydar nagar
I need the query to display the Office address & House address & emp id in single query
ex: 1,Kukatally,hitech
2,kolkata,hydarnagr
View 3 Replies
View Related
Aug 18, 2010
I have a rather hard to trace problem which is keeping me up several days now. We want to implement a package for querying devices via SNMP in our database. There are no packages shipped with Oracle that come handy. UTL_TCP does not work because SNMP works via UDP. After all we came up with the idea to use URL.... Locally on my development machine and on the command line of the Oracle database our first prototype of the SNMP query function works very well, but inserted into the database all I'm getting is a "Request timed out". Firewall mechanisms can not be the problem because the java code runs smoothly on the command line and also a snmpwalk on the command line suceeds, so the database is not blocked by any firewall. First I thought some permission via Java are missing, but I took a look in the USER_JAVA_POLICY view and worked this with SYSDBA out. A java application in Oracle connection via TCP to port 80 and fetching a website works allright, the thing not working seems to be UDP.
View 3 Replies
View Related
Jul 23, 2013
while try to expdp on network drive. getting below error.how can we perform the expdp on network drive
Network location: \\tsclient\p\expdp
1.)SQL> show user
USER is "SYS"
SQL> create or replace directory exp as '\\tsclient\p\expdp';Directory created.
SQL>Grant read,write on directory exp to system;
2.)expdp system/xxxxx@orcl directory=exp dumpfile=EXP_orcl_072013.dmp logfile=EXP_72013_1.log schemas=('IIMS','CMMN')
Export: Release 11.2.0.2.0 - Production on Tue Jul 23 13:48:07 2013
Copyright © 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Release 11.2.0.2.0 - 64bit Production
ORA-39002: invalid operation
ORA-39070: Unable to open the log file.
ORA-29283: invalid file operation
ORA-06512: at "SYS.UTL_FILE", line 536
ORA-29283: invalid file operation
View 2 Replies
View Related
Feb 7, 2007
I'm using Oracle10.0 as database for my project and I have installed Toad as front end tool for the Oracle. Now I want to access the database in the network using the Toad.
My question is, is it compulsory that oracle should be installed in every system to access Toad or any thing can I change in the server system to access the database from other systems in the Network.
View 1 Replies
View Related
Jul 5, 2013
I have created a batch for silent DB Creation through DBCA. I want to add a script to also create the Network Service after. I was told it can be done only with Response File.
Is a response file a script also that can be executed after the DBCA scripts? Where can I find a manual with the available commands so I can produce what I need? On the internet I find only examples for Silent DB installation.
edit-solution
Complete Solution posted as New article
[URL]..........
View 14 Replies
View Related
Mar 1, 2011
I have implement multi master replication between two server.
How much amount of data transfer over the network? How to calculate this value?
View 2 Replies
View Related
Nov 22, 2012
We want to replicate the data between the databases.We have 4 databases in a network.If there will be any change in database 1,e.g. updation in any table,it should automatically replicate on other 3 databases.or user will change something in database 2 ,it should replicate on other 3 databases and vice versa. All 4 databases have same schema and same configuration.
View 1 Replies
View Related
Aug 29, 2013
Recently we had faced network issue due to which node3 server was inaccessible.After the network issue got resolved , node3 was accessbile.So once the issue got fixed , i did a post validation in database and cluster and found listener , network1.org on node3 went offline.
When i try to start listener on node3,i got following error.
grid@RAC3 ~]$ srvctl start listener
PRCR-1079 : Failed to start resource ora.LISTENER.lsnr
CRS-2674: Start of 'ora.net1.network' on 'RAC3' failed
[grid@RAC3 ~]$ srvctl status vip -n RAC3
VIP RAC3-vip is enabled
VIP RAC3-vip is not running
[grid@RAC3 ~]$ srvctl status vip -n RAC2
VIP RAC2-vip is enabled
VIP RAC2-vip is running on node: RAC2
[grid@RAC3 ~]$ srvctl start vip -n RAC3
PRKO-2420 : VIP is already started on node(s): RAC2
[grid@RAC3 ~]$ srvctl status vip -n RAC3
VIP RAC3-vip is enabled
VIP RAC3-vip is not running
[grid@RAC3 ~]$ srvctl status nodeapps
VIP RAC1-vip is enabled
VIP RAC1-vip is running on node: RAC1
VIP RAC2-vip is enabled
VIP RAC2-vip is running on node: RAC2
VIP RAC3-vip is enabled
VIP RAC3-vip is running on node: RAC2
Network is enabled
Network is running on node: RAC1
Network is running on node: RAC2
Network is not running on node: RAC3
GSD is disabled
GSD is not running on node: RAC1
GSD is not running on node: RAC2
GSD is not running on node: RAC3
ONS is enabled
ONS daemon is running on node: RAC1
ONS daemon is running on node: RAC2
ONS daemon is not running on node: RAC3
bring up the listener on node3
View 11 Replies
View Related
Jul 5, 2013
I have created a batch for silent DB Creation through DBCA. I want to add a script to also create the Network Service after. I was told it can be done only with Response File. Is a response file a script also that can be executed after the DBCA scripts?Where can I find a manual with the available commands so I can produce what I need? On the internet I find only examples for Silent DB instalation. EDITOS is Windows 7 Oracle 11.2.0.1 I want to create the Network Service that will add these lines to the tsnames.ora.
DBNAME =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = wsName)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = dbname)
)
)
on both the client and the server.How can i do it automatically through a batch script, so to add it to DBCA scripts after creation? I was told once in atopic that it could be done through a response file.
View 9 Replies
View Related
Sep 9, 2010
I am trying to set-up network encryption.I have added following parameters to my server side sqlnet.ora file:
SQLNET.ENCRYPTION_SERVER = REQUIRED
SQLNET.ENCRYPTION_CLIENT = REQUIRED
SQLNET.ENCRYPTION_TYPES_SERVER =RC4_256
SQLNET.ENCRYPTION_TYPES_CLIENT =RC4_256
SQLNET.CRYPTO_CHECKSUM_SERVER = REQUIRED
SQLNET.CRYPTO_CHECKSUM_CLIENT = REQUIRED
SQLNET.CRYPTO_CHECKSUM_TYPES_SERVER = (MD5)
SQLNET.CRYPTO_CHECKSUM_TYPES_CLIENT = (MD5)
As per my understanding connections should start to fail from client side after addition of these parameter on server side sqlnet.ora (no changes to client side sqlnet.ora).I am still able to connect to this server without connections getting failed.
I already checked aso is installed on this database.Just to add it is a RAC database with 2 nodes.
View 4 Replies
View Related
Oct 9, 2012
We were facing some issue with crs startup and had to delete network socket files present in "/var/tmp/.oracle/".
what these "/var/tmp/.oracle/*" files do?..What informations are there in these files?
View 2 Replies
View Related
Aug 25, 2010
I have installed oracle 11g in my personal laptop, when i open the sql developer and try creating the new connection. am getting "The network adapter could not establish the connection".
View 2 Replies
View Related
Feb 20, 2011
I scheduled a RMAN backup job to take FULL database backup to a shared network drive.
RMAN Script used:
RMAN> run
2> {
3> allocate channel ch1 device type disk format '\\BACKUP1635\X$\ARC%U';
4> backup database plus archivelog;
5> release channel ch1;
6> }
Environment: Windows server 2003 OS and Oracle 10.2.0.4.0
Iam facing below error.
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of backup command on ch1 channel at 02/20/2011 18:19:46
ORA-19504: failed to create file "\\BACKUP1635\X$\ARC1BM55JL8_1_1"
ORA-27040: file create error, unable to create file
OSD-04002: unable to open file
O/S-Error: (OS 5) Access is denied.
I checked shared network drive and found READ/WRITE access for me. I am able to take RMAN backup in local system without any issue.
View 4 Replies
View Related