Convert IIF Access SQL to Oracle SQL...
I am in the process of converting a MS Access application to VB.Net with Oracle database behind. However I am having a problem converting an MS Access Query that contains IIF statements into an Oracle SQL command. Below is the MS Access SQL code:
SELECT PDTABLE_132.UNIQUE_CLASH_ID, CISClashStatusTbl.Approval_Type AS Clash_Status, CISClashTypeTbl.Clash_Type, *IIf([TEMP_ACTION_DISCIPLINE] Is Null,"UNALOCATED",[TEMP_ACTION_DISCIPLINE]) AS ACTION_DISCIPLINE*, *IIf([CISDisciplineTbl].[Discipline] Is Null,[PD_2910A_PDTABLE_111].[DISCIPLINE_NAME],[CISDisciplineTbl].[Discipline]) AS TEMP_ACTION_DISCIPLINE*
FROM ((((((((((((PDTABLE_132 INNER JOIN PD_2910A_PDTABLE_113 ON PDTABLE_132.MODEL_INDEX_NO_A = PD_2910A_PDTABLE_113.MODEL_INDEX_NO) INNER JOIN PD_2910A_PDTABLE_113 AS PD_2910A_PDTABLE_113_1 ON PDTABLE_132.MODEL_INDEX_NO_B = PD_2910A_PDTABLE_113_1.MODEL_INDEX_NO) INNER JOIN PDTABLE_119 ON PD_2910A_PDTABLE_113.MODEL_INDEX_NO = PDTABLE_119.MODEL_INDEX_NO) INNER JOIN PDTABLE_119 AS PDTABLE_119_1 ON PD_2910A_PDTABLE_113_1.MODEL_INDEX_NO = PDTABLE_119_1.MODEL_INDEX_NO) LEFT JOIN CISClashStatusTbl ON PDTABLE_132.IF_APPROVAL_STATUS = CISClashStatusTbl.Approval_Code) LEFT JOIN CISClashTypeTbl ON PDTABLE_132.RECENT_CLASH_TYPE = CISClashTypeTbl.Clash_Code) INNER JOIN PD_2910A_PDTABLE_112 ON PD_2910A_PDTABLE_113.AREA_INDEX_NO = PD_2910A_PDTABLE_112.AREA_INDEX_NO) INNER JOIN PD_2910A_PDTABLE_112 AS PD_2910A_PDTABLE_112_1 ON PD_2910A_PDTABLE_113_1.AREA_INDEX_NO = PD_2910A_PDTABLE_112_1.AREA_INDEX_NO) LEFT JOIN CISOwnerTbl ON PDTABLE_132.UNIQUE_CLASH_ID = CISOwnerTbl.UNIQUE_CLASH_ID) LEFT JOIN CISDisciplineTbl ON CISOwnerTbl.Discipline_Code = CISDisciplineTbl.Discipline_Code) LEFT JOIN PD_2910A_PDTABLE_111 ON PDTABLE_132.ACTION_DISCIPLINE = PD_2910A_PDTABLE_111.DISCIPLINE_INDX_NO) LEFT JOIN PD_2910A_PDTABLE_111 AS PD_2910A_PDTABLE_111_1 ON PDTABLE_132.DISCIPLINE_INDEX_A = PD_2910A_PDTABLE_111_1.DISCIPLINE_INDX_NO) LEFT JOIN PD_2910A_PDTABLE_111 AS PD_2910A_PDTABLE_111_2 ON PDTABLE_132.DISCIPLINE_INDEX_B = PD_2910A_PDTABLE_111_2.DISCIPLINE_INDX_NO
ORDER BY PDTABLE_132.UNIQUE_CLASH_ID;
Any help would really be appreshiated.
Thanks in advance
Simon
Edited by: user8275408 on 21-Jan-2010 07:25
Hi, Simon,
Welcome to the forum!
An Oracle equivalent of
IIf(TEMP_ACTION_DISCIPLINE Is Null,"UNALOCATED",TEMP_ACTION_DISCIPLINE) AS ACTION_DISCIPLINEis
CASE
WHEN TEMP_ACTION_DISCIPLINE Is Null
THEN 'UNALOCATED'
ELSE TEMP_ACTION_DISCIPLINE
END AS ACTION_DISCIPLINE, This assumes that temp_action_discipline is a string. (All THEN and ELSE clauses must return the same data type, or at least compatable types.)
CASE is the most general way of doing IF-THE-ELSE logic in Oracle SQL.
For certain special situations, there may be shorter ways.
Testing a variable to see whether it is NULL or not is one of those situations, so you could also say
NVL2 ( TEMP_ACTION_DISCIPLINE
, TEMP_ACTION_DISCIPLINE
, 'UNALOCATED'
This site noramally compresses whitespace. Whenever you post formatted text here (and code should always be formatted), type these 6 characters:
(all small letters, inside curly brackets) before and after formatted sections.
Edited by: Frank Kulash on Jan 21, 2010 10:41 AM
After reading Bluefrog's answer, I realized that you're testing and possibly returning the same thing, temp_action_discipline.
In that case, NVL, like Bluefrog suggested, is the best thing to do. CASE and NVL2, as shown above, will give the right results, but they're more complicated than you need for this job.
Similar Messages
-
MS Access Crosstab to Oracle SQL
Gurus,
I am trying to convert MS Access Query to Oracle SQL, What would be the Oracle query for this MS Access Crosstab Query?
I am working on Oracle 10g so, I can't take advantage of oracle PIVOT function.
Thank you
Edited by: 951334 on Aug 10, 2012 6:52 AM
Edited by: 951334 on Aug 13, 2012 5:51 AMif your crosstab columns are static you can use well-known technique like
select tablespace_name,
sum(case segment_type when 'TABLE' then bytes end) TABLES_BYTES,
sum(case segment_type when 'INDEX' then bytes end) INDEXES_BYTES,
sum(case segment_type when 'LOBSEGMENT' then bytes end) LOB_BYTES
from dba_segments
group by tablespace_name;
for dynamic crosstab columns you require to build this query dynamically in application -
Migration: Access 2003 to Oracle SQL
Dear All
I would like to perform a migration from Access 2003, to Oracle 10g. I am using SQL Developer for the task, and have reached the point of capturing the XML file that I exported from Access. I need to create a migration repository on the target database, and this is causing problems as I do not have all the necessary privileges.
In the process, I have been advised that migrations from Access to Oracle are not easy to achieve, and in fact require careful planning before execution. My objective is not really to transfer the data stored within the database file. I only really want to convert Access logic into Oracle SQL code. I was wondering if anyone could advise on the typical odds of success in achieving this task.
I migrated the same Access database to MS SQL Server some time ago and the process seemed to go smoothly. Would it be reasonable then to migrate from MS SQL to Oracle SQL if this is easier?
Any feedback would be very much appreciated.
Thank you.
MThanks for your response.
I am not familiar with the intricacies of the process, I'm just following the instructions set out in the Oracle Migrating 3rd Party Databases white paper.
In this document, a process is set out consisting of steps that export an Access database, and then capture it to an Oracle user area with appropriate privileges. The process is achieved through Oracle SQL Developer.
I'd be very grateful if you could expand on your answer if there is a better way of translating Access queries into Oracle SQL. I am aware that an Access front-end is capable of connecting with an Oracle database to execute queries, however, there are considerable limitations in the use of Access that I would like to avoid - hence the migration. -
Translating ms-access sql to oracle sql
I would like to translate this ms-access sql to oracle sql.
SELECT
CStr(STUDENT_ID),
FIRST_NAME,
LAST_NAME,
IIF(LEN(CLASS_CODE)=3,"Y","") AS "ELEMENTARY_SCHOOL",
IIF(LEN(CLASS_CODE)=4,"Y","") AS "MIDDLE SCHOOL",
FROM T_STUDENT
Thanks in advance for your help.
SandraFor an equivalent of IIF, look at CASE or DECODE. For LEN use LENGTH.
A business rule that says elementary and middle schools can always be identifed by the length of their codes sounds rather unreliable, though. -
Help on - convert ansi sql to oracle sql
hi gurus,
i'm try'g to convert ansi sql to oracle sql.
but i'm getting an error. can u please let me know, if i can convert it or is it better to use ansi sql!
original code in ansi format::
select distinct bfc.NBR_SEQ, bfc.IDN_ENTITY, bfc.CDE_TYPE_ENTITY, n.CDE_STATUS,
gec.idn_group as idn_parent_id, bfc.IDN_FUNC_BUSS,
case when bfc.CDE_TYPE_ENTITY = 'P' OR bfc.CDE_TYPE_ENTITY = 'A' then
PKG_FW_NVGTR.GET_NAM_PAGE(bfc.IDN_ENTITY)
else
PKG_FW_NVGTR.GET_NAM_GROUP(bfc.IDN_ENTITY)
end as ENTITY_NAM,
p.Category, p.Display_Txt, p.show_in_nav, p.page_uri
from
T_BUSS_FUNC_ENTITY_CREF bfc
inner join t_buss_func bf on bfc.idn_func_buss = bf.idn_func_buss
inner join t_entity_prog_cref epc on bfc.idn_entity = epc.idn_entity and bfc.cde_type_entity = epc.cde_type_entity
left outer join t_page p on bfc.idn_entity = p.idn_page
left outer join t_group_entity_cref gec on bfc.idn_entity = gec.idn_entity and bfc.cde_type_entity = gec.cde_type_entity
left outer join t_nvgtr n on bfc.idn_entity = n.idn_entity and bfc.cde_type_entity = n.cde_type_entity
where
BF.nam_func_buss = 'CP' AND--P_NAM_FUNC_BUSS and
epc.cde_program in
( select p.cde_program from t_program p where p.nam_program in (
SELECT * FROM TABLE (CAST(PKG_FW_NVGTR.FN_GET_ARRAY_FROM_COMMA_LIST('LC', ',') AS TYP_ARRAY))))
order by
bfc.NBR_SEQ;tried to convert into oracle
SELECT DISTINCT bfc.NBR_SEQ,
bfc.IDN_ENTITY,
bfc.CDE_TYPE_ENTITY,
n.CDE_STATUS,
gec.idn_group as idn_parent_id,
bfc.IDN_FUNC_BUSS,
case when bfc.CDE_TYPE_ENTITY = 'P' OR bfc.CDE_TYPE_ENTITY = 'A' then
PKG_FW_NVGTR.GET_NAM_PAGE(bfc.IDN_ENTITY)
else
PKG_FW_NVGTR.GET_NAM_GROUP(bfc.IDN_ENTITY)
end as ENTITY_NAM,
p.Category,
p.Display_Txt,
p.show_in_nav,
p.page_uri
FROM T_BUSS_FUNC_ENTITY_CREF bfc,
T_BUSS_FUNC bf,
T_ENTITY_PROG_CREF epc,
T_PAGE p,
T_GROUP_ENTITY_CREF gec,
T_NVGTR n
WHERE bfc.IDN_FUNC_BUSS = bf.IDN_FUNC_BUSS
AND bfc.IDN_ENTITY = epc.IDN_ENTITY
AND bfc.CDE_TYPE_ENTITY = epc.CDE_TYPE_ENTITY
AND bfc.IDN_ENTITY(+) = p.IDN_PAGE
AND bfc.IDN_ENTITY(+) = gec.IDN_ENTITY
AND bfc.CDE_TYPE_ENTITY(+) = gec.CDE_TYPE_ENTITY
AND bfc.IDN_ENTITY(+) = n.IDN_ENTITY
AND bfc.CDE_TYPE_ENTITY(+) = n.CDE_TYPE_ENTITY
AND BF.nam_func_buss = 'CP' AND--P_NAM_FUNC_BUSS and
epc.cde_program in
( select p.cde_program from t_program p where p.nam_program in (
SELECT * FROM TABLE (CAST(PKG_FW_NVGTR.FN_GET_ARRAY_FROM_COMMA_LIST('LC', ',') AS TYP_ARRAY))))
order by
bfc.NBR_SEQ;error is
ORA-01417: a table may be outer joined to at most one other tableso how can i convert it?
thanksuser642856 wrote:
explain plan for this select statement
ID PID Operation Name Rows Bytes Cost CPU Cost IO Cost Temp space IN-OUT PQ Dist PStart PStop
0 SELECT STATEMENT 10M 1183M 570694 33G 567917
1 0 SORT UNIQUE 10M 1183M 287940 17G 286502 2607M
2 1 HASH JOIN 10M 1216M 179 1G 84
3 2 COLLECTION ITERATOR PICKLER FETCH PKG_FW_NVGTR.FN_GET_ARRAY_FROM_COMMA_LIST
4 2 HASH JOIN OUTER 2693 299K 58 34M 55
5 4 HASH JOIN OUTER 37 3959 11 24M 9
6 5 HASH JOIN OUTER 37 3663 10 18M 8
7 6 HASH JOIN 37 1147 7 12M 6
8 7 HASH JOIN 59 1180 5 6060823 4
9 8 NESTED LOOPS 2 24 3 15843 3
10 9 TABLE ACCESS BY INDEX ROWID T_BUSS_FUNC 1 6 1 8341 1
11 10 INDEX UNIQUE SCAN UK_NAM_FUNC_BUSS 1 0 1050 0
12 9 TABLE ACCESS FULL T_PROGRAM 2 12 2 7501 2
13 8 INDEX FULL SCAN PK_T_ENTITY_PROG_CREF 59 472 1 18921 1
14 7 TABLE ACCESS FULL T_BUSS_FUNC_ENTITY_CREF 37 407 2 14891 2
15 6 TABLE ACCESS FULL T_PAGE 26 1768 2 14141 2
16 5 INDEX FULL SCAN UK_UNIQUE_GROUP_DEPENDENT 26 208 1 12321 1
17 4 TABLE ACCESS FULL T_NVGTR 6986 47K 46 3179613 46 as you can see.. cpu cost is in 33G..
is there any better way?
thanksCan you run this in a session please:
ALTER SESSION set optimizer_dynamic_sampling = 4;Then run an explain plan again.
And you have a function in there - PKG_FW_NVGTR.FN_GET_ARRAY_FROM_COMMA_LIST - which isn't helping things. -
What is Difference between ANSI SQL and ORACLE SQL
Hi,
I am going to take the assesment test for ANSI SQL Programming before that i want to know any difference between ANSI SQL and ORACLE SQL?
I am studying for SQL but the test will be ANSI SQL please let me give an idea about the both.
Thanks
Merina RoslinBasically there is syntax difference between both of them.
Lets say i want to join two table EMP and DEPT based on DEPTNO.
With Oracle SQL format its like this.
select e.*
from emp e, dept d
where e.deptno = d.deptnoHere the joining condition goes in the WHERE clause.
With ANSI SQL format its like this.
select e.*
from emp e
join dept d
on e.deptno = d.deptnoHere the join condition is mentioned separately and not in WHERE clause.
Oracle supports ANSI SQL starting from 9i version.
You can read more about the syntax difference Here -
How to connect access database through oracle sql prompt
i want to connect access database via oracle , i am trying to import all the data in Access table into oracle table how it is possible .
A.RThe simplest way, if You have already created tables in Oracle DB, is to open the Access MDB, link Oracle tables via ODBC and build a query to append rows reading from Access tables to Oracle tables.
Hope this helps
Max -
Can i run all the SQL And PL/SQL in Oracle SQL Developer?
hi all
I have heard that Oracle Sql Developer is a free editor for Oracle DB from Oracle.
Is it possible to run all the the procedres and functions in that editor
is there any limitation for that ,can i run all the things that we can run on the SQL Plus
if anybody knows please let me know
thanks & regardsInteresting way of putting it.
When it comes to SQL and PL/SQL, SQLPlus and SQL Developer do not really 'run' very much.
Most of the time, these things are just shells that pass the SQL and PL/SQL requests to the appropriate engine (database) which will run the command.
The challenges are:
- will the shell interpret the request as something to pass to an engine?
- will the shell display the response from the engine appropriately?
For answers to those questions, TongucY provided approriate links. -
Debugging a PL/SQL with Oracle SQL Developer
I am trying to debug pl in Oracle SQL Developer, have looked in
http://www.oracle.com/technology/obe/11gr2_db_prod/appdev/sqldev/plsql_debug/plsql_debug_otn.htm#t5
and there are not enabled the options "Data", "Smart Data", etc someone knows why?
thank you.In the log windows, when debug, show tihis:
Conectando a la base de datos OPAVID - Inventariado.
Ejecutando PL/SQL: ALTER SESSION SET PLSQL_DEBUG=TRUE
Ejecutando PL/SQL: CALL DBMS_DEBUG_JDWP.CONNECT_TCP( '10.240.193.202', '2310' )
Later, 1 min.
show this
ORA-30683: failure establishing connection to debugger
ORA-12535: TNS:operation timed out
ORA-06512: at "SYS.DBMS_DEBUG_JDWP", line 68
ORA-06512: at line 1
El proceso ha terminado.
Desconectando de la base de datos OPAVID - Inventariado.
so, do you think, the problem is a firewal, i can´t verify this. -
PL/SQL and Oracle SQL Developer
I just downloaded the latest version of Oracle SQL Developer, because I heard that it is free and comes with a debugger.
So I have it all setup, I am connected to my database, but I wanted to execute a simple example:
I selected to create a new Procedure and a new tab opened up, I pasted this code and under DBMS Output, I clicked the + to: set serveroutput on
CREATE OR REPLACE PROCEDURE TEST1 As
DECLARE
mytext varchar2(100) := 'Hello world!' ;
BEGIN
dbms_output.put_line(mytext) ;
dbms_output.put_line(mytext) ;
END TEST1;yet, I get an error:
Source does not have a runnable target.
So, is this made to only work with the database objects ? Tables ? I can't execute a simple Hello World ?
Please help, thanks!
Edited by: Kodiak_Seattle on Mar 7, 2011 12:06 PMKodiak_Seattle wrote:
wow, you are the rudest person I have ever encountered here on Oracle forums, you work for Oracle ?Most people on these forums do not work for Oracle, it is a public forum.
http://www.oracle.com/html/terms.html
You post here for free and people are free to respond in any way they see fit within reason. You do not get to choose the demeanor of the responses like you would if you were paying somebody.
I just want to make sure my dollars will not go there anymore...If you paid someone to use this forum you were robbed.
have a nice life under that rock! - don't bother to reply.Don't bother to tell others what they can or should do on here, it will just just disappoint you. You will be happier with these people they will do as they are told.
http://www.google.com/search?q=oracle+consultant
The responses you received accurately identified the problems you were having were a result of attempting to debug a procedure before you had compiled it. For free. And you complain.
Now that is rude. -
Exception: oracle/sql/Datum [oracle.sql.Datum
The following statement is throwing an exception in Servlet,
OracleXMLQuery qry = new OracleXMLQuery(conn,sqlString);
Where can I find the oracle.sql.Datum class
Thank you,
Chandra
nullMurali K (guest) wrote:
: Hi Chandra,
: What version of Oracle are u using ? (Oracle 8.0.5 or
: Oracle8i?). Cause the object features were supported in JDBC
: only in Oracle8i. (i.e. JDBC 8.0.4 etc.. does not support
: objects, only JDBC 8.1.5 onwards supports it)..
: The most likely case is that you are trying to use object
: features, using JDBC 8.0 classes.
: If this is not the case, please let us know (along with the
: version of JDBC and Oracle that u are using), so that we can
: look in to it.
: Thanks
: Murali
: Chandra (guest) wrote:
: : The following statement is throwing an exception in Servlet,
: : OracleXMLQuery qry = new OracleXMLQuery(conn,sqlString);
: : Where can I find the oracle.sql.Datum class
: : Thank you,
: : Chandra
Hi Murali,
I am using Oracle JDBC Drivers Ver. 8.0.4.0.5, connecting to
Oracle database Ver. 7.3.4.0.1. This is working fine in my java
applet running on appletviewer. After moving the JDBC
connection code from applet to Servlet running on JRun web
server, I got the exception. In both the cases I am using the
same JDBC drivers.
Thank you.
Chandra
null -
Converting a MS Access Query to Oracle SQL
Hi,
We have a large number of MS Access (2000) queries (mostly select queries -Some containing sub queries-) that need to be converted to Oracle's syntax to be used on our intranet instead of the existing Access frontend.
Do you know of a tool that can do this?
We understand that conversion tools are not always reliable, but even if 75% of the queries are converted for us we can then focus on the ones that pose problems.
Regards,
Charles McGrottyHi Charles,
The next release of OMWB ( version 92017, due at the end of this year) will contain some support for Select and Action queries. In that version, we will load queries from the source MS Access database into the OMWB repository. Since the MS Access plugin for OMWB does not currently contain a parser, the query text will be commented out and surrounded in an Oracle View stub - this means that the queries can, at least, be migrated to Oracle and then manually converted by the migrator from within the Oracle database. Often, the body text for a select query exactly matches the syntax for an Oracle view, so the manual work required to convert the queries may be minimal. This will be the first step in migrating MS Access Queries that the OMWB provides.
I hope this information is useful,
Tom. -
MS Access 2010 and Oracle SQL Developer Version 4.0.3.16 Error
OS: Windows 7 Enterprise
System Type: 64-bit Operating System
I can not get MS Access 2010 to work/open with SQL Developer version 4.0.3.16.
ERROR when testing connection to MS Access 2010
"Status : Failure -Test failed: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified"
I added the 32-bit ODBC data source for the MS Access I am trying to use with SQL Developer version 4.0.3.16 with the "C:\Windows\SysWOW64\odbcad32.exe" application, but I still get the same error.
I appears that SQL Developer version 4.0.3.16.is looking at the 64-bit driver (ODBC Data Source) and I have no idea to direct SQL Developer version 4.0.3.16 to use the 32-bit driver (ODBC Data Source) when opening MS Access 2010.
Thank you in advance for your advice.I downloaded the SQL Developer version 4.0.3.16 "sqldeveloper-4.0.3.16.84-x64.zip" that included the jre.
How do I check which Java JDK I am running (32-bit versuns 64-bit)?
In the command prompt I use "java -version" and I get this message "java is not recognized as an internal or external command" -
Help:Modifying access sql to Oracle sql
Hello folks can anybody please help me in changing the following code to oracle.Thanks a million.
select
IIf(prorated_directpay = 0 And prorated_feepaid = 0,
"CASH DEPOSIT",
IIf(prorated_directpay <> 0 And prorated_feepaid = 0,
'NONCASH DIRECTPAY',
IIf(prorated_directpay <> 0 And prorated_feepaid <> 0,
"NONCASH FEE RECEIVED"))) AS recovery_flg,
Left$(patientmemberid, Len(patientmemberid) - 2) AS Pat Mem ID
from
table
WHERE (((Debtor . LOB) = "MEDICAL") And ((Debtor . PRORATED_TRANAMT) <> 0))
Or (((Debtor . LOB) = "MEDICAL") And ((Debtor . PRORATED_TRANAMT) = 0) And
((Debtor . PRORATED_FEEAMT) <> 0))
Or (((Debtor . LOB) = "MEDICAL") And ((Debtor . PRORATED_TRANAMT) = 0) And
((Debtor . PRORATED_DIRECTPAY) <> 0))
Or (((Debtor . LOB) = "MEDICAL") And ((Debtor . PRORATED_TRANAMT) = 0) And
((Debtor . PRORATED_FEEPAID) <> 0))
Edited by: user11961230 on Nov 5, 2009 1:35 PMuser11961230 wrote:
Hello folks can anybody please help me in changing the following code to oracle.Thanks a million.
select
IIf(prorated_directpay = 0 And prorated_feepaid = 0,
"CASH DEPOSIT",
IIf(prorated_directpay <> 0 And prorated_feepaid = 0,
'NONCASH DIRECTPAY',
IIf(prorated_directpay <> 0 And prorated_feepaid <> 0,
"NONCASH FEE RECEIVED"))) AS recovery_flg,
Left$(patientmemberid, Len(patientmemberid) - 2) AS Pat Mem ID
from
table
WHERE (((Debtor . LOB) = "MEDICAL") And ((Debtor . PRORATED_TRANAMT) <> 0))
Or (((Debtor . LOB) = "MEDICAL") And ((Debtor . PRORATED_TRANAMT) = 0) And
((Debtor . PRORATED_FEEAMT) <> 0))
Or (((Debtor . LOB) = "MEDICAL") And ((Debtor . PRORATED_TRANAMT) = 0) And
((Debtor . PRORATED_DIRECTPAY) <> 0))
Or (((Debtor . LOB) = "MEDICAL") And ((Debtor . PRORATED_TRANAMT) = 0) And
((Debtor . PRORATED_FEEPAID) <> 0))
Edited by: user11961230 on Nov 5, 2009 1:35 PMYou bet, start by applying the lessons you learned in [YOUR LAST POST|http://forums.oracle.com/forums/message.jspa?messageID=3874940#3874940] and then come back with specific questions. Have you thought to use google to determine what the Access functions, which are not available in Oracle, do? After doing that, you can again google to see if you can find similar functionality in Oracle, if not ... we're here to help. -
Converting Number to Date in Oracle sql
I have some values in field1 like
20110820,
20110821,
20110822
which is a number datatype and
which is something like yyyymmdd.
I want to convert it to date format as 'dd/mm/yyyy'.
I have to use in select query something like if (A.field1=0, 01/01/2000, A.field1).
How can i achieve this ?to_Date(substr(date1,7,2)||'/'||substr(date1,5,2)||'/'||substr(date1,1,4),'dd/mm/yyyy')
Maybe you are looking for
-
I keep getting an error message when trying to update iTunes
Every time I try to update iTunes on my iPad aOr my iPhone I get errors occurred while installing. Please help
-
Video Resolution, and Windows Reset?
Two quick questions. 1. Where, if possible, can I set the settings for the videos resolution (i.e. 16:9, pixels, ect) 2. Is it possible to reset all the windows to their default opening layout and size? (I screwed up something on my timeline so now o
-
PGP Encryption Error using OpenPGP
Hi all, I am trying PGP Encrption using Custom module in one of the scenario's. While Executing the code on my local system(simple java project) i am getting following error. Exception in thread "main" java.lang.RuntimeException: NYI at cryptix.
-
Help!!!! I recently installed Hyperion version 11.1.2.1 and configured my products. My Shared Services is up and running, and so is my Essbase. But my Workspace is blank. When i go to the url, all i see is a blank blue screen with the file,menu,tools
-
HELP! what does it mean to authroize your computer
hello i have some games and tv shows that my friends gave to me on y i pod video and then i want to put them on my i tunes. what do i do? transfer purcheses from My ( My Ipod) thn if i do then it says that i need to authorize my computer. what does t