SQL & PL/SQL :: Convert Local Time To UTC

Oct 30, 2013

oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
PL/SQL Release 11.1.0.6.0 - Production
"CORE 11.1.0.6.0 Production"

I am trying to write a function that accepts LOCAL DATE, LOCAL TIME, LOCAL TIME ZONE, COUNTRY CODE as inputs, and UTC DATE, UTC TIME as outputs. LOCAL DATE, LOCAL TIME, LOCAL TIME ZONE has to be of DATETIME datatype, and COUNTRY_CODE of VARCHAR2(3).

View 8 Replies


ADVERTISEMENT

SQL & PL/SQL :: Convert UTC To Local Time?

Sep 16, 2011

The data's are store in UTC time for all the country. we have to convert this to local country time. I build the procedure will generate the statement as per the country. But some of the timezone is working. like first example is working,second example is not working. I am getting following error.

dbtimezone is UTC-4

ORA-01882: timezone region not found

ex1: update Test.Maindata set MODIFIEDDATE=FROM_TZ(CAST(MODIFIEDDATE AS TIMESTAMP),'GMT') AT TIME ZONE 'America/New_York';

ex2:update Test.Maindata set MODIFIEDDATE=FROM_TZ(CAST(MODIFIEDDATE AS TIMESTAMP),'GMT') AT TIME ZONE 'Asia/Amman';

View 4 Replies View Related

SQL & PL/SQL :: Date Value Should Convert Into Local Time Zone?

Mar 6, 2012

I have a UI which is java and database in oracle 10g and database resides in India. Now the user use this application across the world. Date related value stores in IST format.

Now the requirement is whenever any user open the application in USA ,then date value should convert into their local time zone. So is there any way in oracle to convert and show the date value according to their local time zone.

View 12 Replies View Related

How To Convert GMT Date To Local Time Date

Sep 16, 2011

I need to convert the type of GMT to Local time, during data entry. I have a source table and a target table.

To make the insert get the most value, I have no problems:

insert into destination (SELECT * FROM WHERE source pointnumber = (SELECT MAX (pointnumber) FROM source));

But since times are different between the tables, I want to convert the data obtained to GMT -4:30 Time (Caracas - Venezuela), before inserting it.

I can use a function?

View 1 Replies View Related

SQL & PL/SQL :: Get Local Time

Mar 6, 2012

Any way in sql to get the data from my local machine, where only client is installed, not the database.

View 4 Replies View Related

SQL & PL/SQL :: Local Timezone With Day Light Saving Time?

Oct 22, 2011

Order time is not properly displayed in the local timezone format and day light saving calculation is also another issue. Description:

We have web application & a centralized database where users can create orders globally. When orders are created time is saved in UTC format in the centralized global database.

somehow along with the UTC order time, timezone description is also being stored in one of the Database table as

UTC time as: '28-NOV-2010 11:24:54 PM'
Timezone description:
(GMT) Casablanca, Monrovia
(GMT) Greenwich Mean Time : Dublin, Edinburgh, Lisbon, London
(GMT+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna
(GMT+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague
(GMT+01:00) Brussels, Copenhagen, Madrid, Paris
(GMT+01:00) Sarajevo, Skopje, Warsaw, Zagreb
(GMT+01:00) West Central Africa
(GMT+02:00) Athens, Beirut, Istanbul, Minsk
(GMT+02:00) Bucharest
(GMT+02:00) Cairo
(GMT+02:00) Harare, Pretoria
(GMT+02:00) Helsinki, Kyiv, Riga, Sofia, Tallin
.....
...

With this information how can I map timezone description to V_$TIMEZONE_NAMES. I read Oracle automatically converts to local timezones by considering day light saving timings when TZNAME is given as input with the datetime. by using above timezone descriptions how can I get TZNAMES which are in V_$TIMEZONE_NAMES.

View 1 Replies View Related

Server Administration :: Convert Global Index To Local Index

Jun 23, 2011

I have a global index and I want to convert it to local index.Is there a way to recreate local index with out dropping the global index.

I can create a local index first and then drop the global index. But is there a way to create it with out dropping the global index, just convert it.

View 5 Replies View Related

SQL & PL/SQL :: Convert Time Part Into Second

May 10, 2013

How can i convert the time part into second. for example

in mu table i have below rows

1753-01-01 09:18:00.000
1753-01-01 09:52:00.000
1753-01-01 09:36:00.000

I want to convert the time part of each rows to number of second in different column. so for the 1st rows it is 09:18:00.000 that means 9hour and 18 min = 9*60*60+18*60.

But that is complex column.

View 14 Replies View Related

PL/SQL :: Convert Number Into Time?

Mar 8, 2013

I need a query that convert number into time.

View 5 Replies View Related

PL/SQL :: Convert Integer To Time

Aug 14, 2012

I have times stored as an integer in a table.

e.g.

102506 = 10:25:06
130455

How can I convert this to time format HH24:MI:SS?

View 6 Replies View Related

Real Application Clusters :: Listener Status Showing Local Virtual IP / But Not Local IP

Jan 19, 2013

SNRCTL> stat LISTENER
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for IBM/AIX RISC System/6000: Version 11.2.0.1.0 - Production
Start Date 19-JAN-2013 00:50:10
Uptime 0 days 0 hr. 29 min. 51 sec
Trace Level off
Security ON: Local OS Authentication
[code]....

In every oracle documentation for e.g:11.2 Scan and Node TNS Listener Setup Examples [ID 1070607.1] we found the local listener status showing both local-ip and vip. Why is not showing in our case?

View 8 Replies View Related

SQL & PL/SQL :: Convert From GMT To CST With Daylight Time Savings?

Mar 29, 2012

My database stores time in GMT.. but my application stores time in CST..

I need to convert them from GMT to CST considering DAYLIGHT TIME SAVING as well by using Sql query..

View 2 Replies View Related

SQL & PL/SQL :: Get Difference And Convert Integer To Time In Hours And Minutes

Jun 14, 2012

How to get Time Difference between two DateTime Columns in Oracle 10g ?

View 10 Replies View Related

Convert DATE To EPOCH Time Taking Care Of Daylight Savings?

Nov 8, 2012

How can I convert a DATE to EPOCH time taking care of daylight savings?

I tried with this code but there is a difference of 36000 seconds. eg:Sysdate_To_Epoch('04-Sep-2012') gives 1346716800 whereas it should give 1346680800.

CREATE OR REPLACE FUNCTION Sysdate_To_Epoch(v_date IN DATE)
RETURN NUMBER
IS

[Code]....

View 1 Replies View Related

JDeveloper, Java & XML :: Date Time Omits Time Part

Jun 4, 2012

When I try to extract the date tag value from XML data, the time stored in 20120602153021 format i.e., YYYYMMDD24HHMISS format. The following statement extracts only date as 02-JUN-12 however do not extract the time part.

If I try the same in SQLplus with to_date it works however fails in PL/SQL.

XML data:
<?xml version="1.0"?>
<RECORD>
<REGTIMESTAMP>20120601130010</REGTIMESTAMP>
</RECORD>

PL/SQL Extract:

CURSOR c_xml_record
IS
SELECT extract(value(d), '//ACTIVATIONTS/text()').getStringVal() AS REGTIMESTAMP,
FROM t_xml_data x,
[code].......

View 3 Replies View Related

Local Index Scan

Nov 17, 2012

if i have local index, does query which uses this index always have to scan all partitions?

For example, I have hash-partitioned table on column A. There is local index on column B. I am querying:

select * from my_table where A='ABC' and B>123.

I know that records with A='ABC' are in 2nd partition. Does only 2nd partition of local index will be scanned or all of them must be scanned?

View 1 Replies View Related

How To Set Interval Time 4hrs In Dbms_jobs But Starting Time 3:00 Am

Jul 25, 2013

how to set interval time every 4hrs in dbms_jobs but starting time 3.00am.

i am set trunc(sysdate)+4/24. but it will take starting at 12.00,4.00,.....in this way..

View 2 Replies View Related

Reports Are Not Generated In Local Systems

Sep 14, 2010

i have faced one problem with reports. i had created 4 reports. recently we are designed new application using oracle forms6i. we are created more than 10 forms and added to application they were working fine. but when i was added these reports they are not generated. but in server report are running. i mean the report genereted in server but not in local system.

View 4 Replies View Related

SQL & PL/SQL :: HTML Code In Local Variable?

Mar 14, 2012

I am working on a procedure which will insert a concatenated field that will have HTML code and a paramater value into a procedure. For some reason I am having issues inserting the HTML code into the local variable for process. I am not getting an error but instead the insert is not including the value in the variable when code when it runs. Do I need to enclose anything around the HTML to make this work?

This is an example of how I am populating the variable:

Begin
Select '<a href="URL>...l;
End;

View 4 Replies View Related

SQL & PL/SQL :: Read File On Local Machine?

Jun 27, 2012

From a script how I can read a local file (where I have the sql client)?

I have an Oracle database on a server, and I connect from another machine with SQL Developer.I want to read a text file on my local machine ( where I run my script) to use the data in the script.I never want to read or write on the server.

Reading on internet i read about UTF_FILE package But what is not clear to me is, this is on the server or client ?Also some people says UTF_FILE can work both on client side and server side.Also I read about package text_io, but I think it is only for forms.

View 5 Replies View Related

SQL & PL/SQL :: Use Local Temp Tables Within Procedure?

Nov 23, 2012

Is it possible to create local temp variable based table within sql procedures, i am planning on writing few select queies,and want to store teh result of each select to a temp variable based table.

Within sql serevr, i can create temp tables within and then later after i use teh data at teh end drop the table.

Is it possible, since i don't want to create any physical tables.

View 1 Replies View Related

SQL & PL/SQL :: Use Of Local And Global Partition Index

Aug 17, 2010

What is the use of Local and Global Partition Index?

View 1 Replies View Related

SQL & PL/SQL :: Interval Partitioning With Local Index?

Nov 25, 2011

I Have created a interval partitioned table with local index.But when automatic partitions are created based record insertion, whether local indexes will be created for each newly created partition or not? If created, how to check

Below is the code which I tried

CREATE TABLE interval_date
(
date1 date,
days VARCHAR2(50)
)
PARTITION BY RANGE(date1)
INTERVAL (NUMTODSINTERVAL(45,'DAY'))

[code]....

View 7 Replies View Related

PL/SQL :: Loading Data From Local Directory

Jan 22, 2013

I have a requirement like, I received .dat files and placed in my local directory and there is a process/method where this data which is there in .dat file will insert into my oracle external tables?Any link of the example with clear steps?

View 9 Replies View Related

Can't Able To Connect To Local Database Instance

Oct 31, 2012

I cant able to connect to my local DB instance. Oracle service for DB instance will be started running when the system boots automatically.I faced this problem before, I was instructed to boot my system without network connection. It worked for few days. Suddenly I cant able to connect to my local DB instance again, even though I am booting my system without network connection.

This is the configuration I have in tnsnames.ora in my local machine.I have the host as localhost, because local machine is laptop and IP will change periodically.

CSS =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = CSS)
[code]....

View 14 Replies View Related

Globalization :: Character Set For Local Language

Dec 2, 2012

I am using oracle 10 g database on windows xp. I have backup of data contains data in local language (Marathi). I want read this data in oracle itself.Which character set need to choose?

View 6 Replies View Related

When Do Global And Local Indexes Becoming UNUSABLE?

Nov 29, 2012

RDMS Version : 11.2.0.2
Platfomrm : AIX 6.1

For partitioned tables (RANGE, LIST types ) what are circumstances when a Global or a Local Index become UNUSABLE ? I was told that in some circumstances where the Indexes become UNUSABLE , not even a SELECT query against the table will work. Is this true ? For partitioned tables with Global Index, the global index will be listed in DBA_INDEXES . Right ?

View 5 Replies View Related

Global And Local Inventory - Patchset?

Apr 21, 2013

1)What is the use of inventory?

2) Global inventory is found by checking the oraInst.loc file. How to find the location of Local inventory?

3)Why is every patchset(11.2.0.2) now a full release?

View 4 Replies View Related

How To Rebuild Local Partitioned Index

Jan 29, 2013

2day i was dropping few unwanted index from the data base, By mistake i removed the local partitioned index , So i want to recreate that index.i create the index, will the partitioned index updates when we add partitioned to the tables.

View 2 Replies View Related

Fetch Time Greater Than Execute Time?

Dec 27, 2010

I have one inline view query which shows exec\ fetch : 2 sec\ 19 sec It gives 500 rows as final out put, when i give rownum<100 it shows exec\ fetch : 1 sec\ 000 sec, and i cannot use this rownum< 100 alternative as this is inline subquery of big query.

What does this exec and Fetch time is?

How to improve fetch time, (esp with sub-query) ?

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved