SQL & PL/SQL :: How To Get Time Zone Of The Country Entered
May 24, 2010I have a procedure wherein i'll only get country name as input parameter, how can i get Time Zone of the country entered.
View 12 RepliesI have a procedure wherein i'll only get country name as input parameter, how can i get Time Zone of the country entered.
View 12 RepliesI have developed customer entry form, its working fine. I have 2 display items on form. One is country name & other is region, these are fetched based on country id LOV.
Now I want to display country name & region at time of navigation. I have written following code on WHEN_NEW_RECORD_INSTANCE of block.
******
DECLARE
CCNTRY_ID VARCHAR2(2);
CCNTRY_NAM VARCHAR2(25);
CREGION VARCHAR2(11);
begin
select cntry_nam,region into ccntry_nam,cregion from cntry where cntry_id=ccntry_id;
exception
when no_data_found then
message('NO DATA FOUND');
end;
**********
I always get message not data found on navigation. Problem is only with the display item other, values of database columns are being shown.
Check the following
SELECT FROM_TZ(CAST(TO_DATE('1999-12-01 11:00:00',
'YYYY-MM-DD HH:MI:SS') AS TIMESTAMP), 'gmt')
AT TIME ZONE '+05:30' "Time at Time zone"
FROM DUAL;
Time at Time zone
01-DEC-99 04.30.00.000000 PM +05:30
My requirement is that
I want to add 2 hours to DateTime i get here i.e. add two hours in result and display the resultant date and tine in time zone '+05:30'. I also want to check that the resultant time falls in business hours (9 am to 6 pm).
will Import into a table I am getting the below error message Error Message
Record 1: Rejected - Error on table MTN_BUNDLES_EXPIRY_MIG, column EXPIRY_DATE_T.
ORA-01840: input value not long enough for date format The data client provide in .XLs file 2013-08-31 17:14:56My Table Structure is
CREATE TABLE tmp_mtnuga_3g_expiry_mig
(
MSISDN_V VARCHAR2 (50),
expiry_Date_t TIMESTAMP(6) WITH TIME ZONE
status_date_t TIMESTAMP(6) WITH TIME ZONE
GOT_STARTER_PACK_V NUMBER(10)
);
I am using 2 option to import into a table First option using Toad ---> Import Table -- option here i am getting error likeThe format is not matched.Second option using SQL Loader-->
LOAD DATA
INFILE 'D:ssTT-ProjectsCustomer AppsClient Dump3GBundle.csv'
BADFILE 'D:ddTT-ProjectsCustomer AppsClient Dump3GBundle.bad'
DISCARDFILE 'D:ddTT-ProjectsCustomer AppsClient Dump3GBundle.dsc'
[Code]...
how solve the TimeStamp
I'm having trouble using interval data types in a procedure. I need to pass a number of minutes as a parameter, and then use them for arithmetic on a timestamp with time zone. This works no problem:
set serveroutput on
create or replace procedure tstz(mins varchar)
as begin
dbms_output.put_line(systimestamp - interval '10' minute);
end;
[code]...
I've tried a few variations of data type and type casting for the parameter, but I can't make it work.
I was given this query: SELECT TZ_OFFSET('EST'),dbTIMEZONE,SESSIONTIMEZONE, CURRENT_TIMESTAMP FROM DUAL;
My coworker also said this:
Using this statement as a starting point:
SELECT TZ_OFFSET('EST'),dbTIMEZONE,SESSIONTIMEZONE, CURRENT_TIMESTAMP FROM DUAL;
but I need
for
select -5 from dual;
to return
America/NewYork or EST
When i run the below query the time zone changes from -06:00 to +06:00 How do i retain the same time zone -06:00? Im in Oracle 10GR2.
select TO_TIMESTAMP_TZ('2013-03-08'||'03:00:00.000-06:00','YYYY-MM-DD HH24:MI:SS.FF TZH:TZM') from dual;
Output: 3/8/2013 3:00:00.000000000 AM +06:00
I would like to know how to convert the following:
13-AUG-12 03.30.06.146 PM
to the format:
"MM/DD/YYYY HH:MI:SS AM"...
I believe there is a time zone issue here as well, since the should actually be around 11:30am. I am not sure what time zone is being used.
I am able to see 1Hr difference in my date fields of SQL output because in UI (User Interface) date field was stored in BST format but DB time zone is in GMT format so how to find a solution for 1 hr difference, here i don't have Privileges to alter DB time zone and i couldn't use function as i have so many SQL's and can't apply that function manually. SO is there any other option to change the DB time zone with out alter it and with out using function.
View 1 Replies View RelatedI 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.
I have created a job using DBMS_SCHEDULER with named schedule.
After i have modified the schedule using the below queries,
exec dbms_scheduler.disable( 'JOB1' );
exec dbms_scheduler.set_attribute_null('JOB1','schedule_name');
exec DBMS_SCHEDULER.SET_ATTRIBUTE( name => 'JOB1', attribute => 'repeat_interval', value => 'freq=WEEKLY;BYDAY=SUN,WED,FRI;BYHOUR=05');
exec dbms_scheduler.enable( 'JOB1' );
I am using the client system to change the setting and the time zone differs from that of production. Even though the job is scheduled to run at 5 AM it show the start date as 6:30 PM which is the client system time.
our system admin is changing the time zone on solaris system, how can it effect my DB or as DBA what should i check before he do that and after he change the time zone. he is changing the time zone because of an issue with the DST (Daylightsaving time).
View 1 Replies View RelatedHow to check the listener time zone settings/values in Oracle 10g database?
View 5 Replies View RelatedI want to get a list of vendors based on country and campaign.I first get all vendors based on country then i subtract the vendors i shouldn´t see (the vendors i should not see minus those i should see).Below you see my query - is there a better way to get the same result?
3 tables
vendor - vendorInformation
vendorcountry_spec - A vendor can be located in different countries with different information.
vendorcountry_campaign - In a country there are different campaigns. If there is a row in this table, only those with the campaignID should see the vendor else everyone in that country.
The query:
SELECT v.vendorID
FROM vendor v, vendorcountry_spec vs
WHERE v.VENDORID = vs.VENDORID AND v.status = 'A'
AND vs.STATUS = 'A' AND vs.ISCORPORATE = 1
AND v.ISNOTHIGHLIGHTED = -1 AND vs.COUNTRYCODE = 'SE'
GROUP BY v.sortNr, v.vendorID
[code]....
how hard it or even if it is possible to add countries to the list of available for display in the maps build-able by APEX 4.2? We have a set of data to display by country and found that Serbia is NOT in the set of associated mapable countries..Should I try asking Anychart too? Thought Hilary would pickup on this since It involves charting in APEX...
Running on Apex 4.2, Oracle 10.2, Solaris with http server.
I'm trying to do a count on the number of combinations of country/state codes that are invalid (in Australia) for driving licenses.
select COUNTRY_CODE, STATE_CODE, count(*) from
(select COUNTRY_CODE, STATE_CODE from CUSTOMER_TABLE
where DRIVING_LICENCE is not null
and not (COUNTRY_CODE in ('AUST') AND STATE_CODE in ('VIC', 'NSW', 'SA', 'QLD', 'NT', 'TAS', 'WA', 'ACT')))
group by COUNTRY_CODE, STATE_CODE
The output is okay...for example I get these results:
INTINT
NZSI
NZINT
AUSTINT
NZNSW
NZ <null>
However, what I am missing is the combination of "AUST" & <null> for country/state respectively. Am I writing the code correctly?
Table A
Id Country city
1 US
2 US Boston
3 Boston
4 US Newyork
5 London
6 Japan Tokyo
Im looking for a query which returns results based on both city and country passed.
If i pass country US and city Boston it should return row2 with US and Boston row
If i pass country null and city Boston it should return row3
If i pass country UK and city Boston it should return row3
If i pass country UK and city London it should return row5
i.e. If country/city combination exists in DB return that row Else city row should be returned.
which is really a HA zone clustered in VCS(not important for installation of the database).
What parameters do I need to set or change in the Solaris zone, there seems to be no /etc/system file.
my data :
id cost
aa_aa 100
ab_aa 100
bb_bb 100
ba_bb 100
ab_aa 100
I need to get my data as
if id like 'aa_%' then it should sum cost for ids for aa_aa and ab_aa and print only 1 row with putput as
id cost
aa_aa 300
If id is like 'ab_%' then it should sum up
ids only for ab_aa..
Output as:
id cost
ab_aa 200
I have to compare a string entered in a form with a series of English strings in back-end PL/SQL( using LIKE operator )
But it so happens, the string entered in the form is specific to the language used in the country. for ex. in Dutch, it is entered in Dutch language.
So on comparing, it fails as the PL/SQL compares it with English Strings.
FRM-40202: Field must be entered.I have a custom form,developed by someone few years ago. While doing a F11 (query-find) in this custom forms in Oracle application, I get the message FRM-40202 Field must be entered because I have some mandatory fields.Below are the steps I follow to reproduce this bug.
- Open custom form
- Enter data/values in all mandatory fields.
- save. It saved back in database.
- then CTRL+F11 to see all the records.
- Only first two records are showing in the screen.
- And "FRM-40202: Field must be entered." at the bottom.
I'm having some columns in my form with required_property set to yes. When I'm trying to query FRM-40202 appears.
View 3 Replies View RelatedI'm getting below error. how can we avoid this error?
ERROR: frm-40102 record must be entered or deleted first
I have a column named account_detail of data type Varchar2(70). I want to enforce a law such that all data being entered in this column is entered as
22 22 22 22
which means there is a space after every two digits. How do I achieve this through oracle forms, is there a way in the property pallette through which I can set it's property to reflect this change or should I do this with key-next-item.
how to retrieve values if user entered in Mixed case means (case insesitive)?
We don't have control when user enters values and it might be SMITH or Smith or smith or SmIth.
How can write the query to get this kind of mixed case data?
I'm trying to add a column in an existing form. I added a text item and defined it as a database item. When I tried to rename the item the message (frm-15500 valid and unique object name must be entered)appears, and therefore not able to exit the property Platte.
Is there a way I can exit the Platte and should I've first add the column to the data block and then rename in my form ?
I am making a field mandatory dynamially by set_item_property to Required Yes.So when i left it blank it is displaying the error Frm-40202, it's fine. But when i closing this error message by clicking on OK button to enter the field it was not allowing me to navigate into the field. The same error message is reopening.
View 2 Replies View RelatedI have two blocks, blockA and blockB, both from the same table which is tableX.
When I query from blockA and it has returned results, then I go to blockB and edit some data and save, there was no problem. But when I don't execute query from blockA or if the query returned zero results, then I go to blockB and edit some data then save, I got this error. THe cursor then go to blockA first item. So now I have to delete that empty row before saving.
I am getting an error whenever I attempt to save a record.My form has a number of none table data blocks and one database block. I have traced the program and only one commit_form is being entered and I keep getting the 40405 error.
I have attempted to trap in an form level on-error trigger but that doesn't fire for this error.
I got an error FRM-40202: Field must be entered. I did some modifications to Standard form by copying it. after that when I selected the first Email check box in the list and then selected the Email button which I created newly for that form.
View 1 Replies View Related