Fetching Oracle datatype through query...
Hi,
Can you tell me from which table I can query all the datatypes supported by the oracle?
For example if I say Select tname from tab, it gives all the table name in the database, similarly I need a query through which I should be able to fetch the oracle datatypes.
I want to create a table on the fly so I am planning to show all the oracle datattypes in a combo box, which I do not want to hardcore.
Thanx a lot in advance...
Things used to be quite simple. Fundamentally there are are only three primitive datatypes - NUMBER, DATE and VARCHAR - and everything is some variation of one of those. Plus BLOB and CLOB for large objects, of course (nobody should be using LONG any more).
Now 9i has introduced XMLDATA and TIMESTAMP, which are similar to LOB and DATE, but actually have lots of different functionality. But what really makes things confusing is the User-Defined datatype, i.e. objects. You can use any TYPE in your database as a legitimate column datatype.
Finally
Similar Messages
-
Oracle XSU: oracle.xml.sql.query.OracleXMLQuery is not recognized
Hi, there!
I've got a problem when tryed to use Oracle XSU (xml-sql utility to generate xml). My simple java application works fine using XSU. But when I created session stateless bean I've got an EJBException regarding this
line:
oracle.xml.sql.query.OracleXMLQuery qry = new oracle.xml.sql.query.OracleXMLQuery(conn, commandSQLStatement);
It doesn't recognize OracleXMLQuery class as I've got in dump. So my classpath includes original location of that utility and Oracle parser.
I really appreciate for any help.
Thanks.
strXML = qry.getXMLString();Patricia,
Did you go through the link
Re: XML SQL Utility
You have to put xsu12.jar in the lib directory of the jdev.
xsu12.jar is in the lib directory of the XDK installation.
You can download XDK from
http://www.oracle.com/technology/tech/xml/xdk/software/prod/xdk_java.html
Just download the XDK kit, get the xsu12.jar from the lib directory and put in the lib directory of the jdev.
-- Arvind -
Oracle.xml.sql.query.OracleXMLQuery GetXML -withDTD
I'm trying to create a dtd for each table in my schema. I've created a java program that loops through the user_tables and I am then trying to create the DTD with oracle.xml.sql.query.OracleXMLQuery -withDTD. I am able to make it work using the XSU Command Line Utility, but I'm having a hard time trying to find out where the -withDTD flag goes inside my java program. Anyone know how to use the -withDTD option inside of a java program?
Thanks[from XmlRpc-Java]
As a result, my XML
is contained in a String instead of an InputStream.
It is possible to convert a String to an InputStream using
StringBufferInputStream, but this class is deprecated in favor of
StringReader (as StringBufferInputStream does not properly convert
characters into bytes).
For the default HTTP transport, an InputStreamReader could be used to
wrap the InputStream before calling parse().
Ultimately, the InputStream is converted to an InputSource for use by
the SAX parser. InputSource will accept a Reader as well.
[from XmlRpc-Java]
There should be a way to go from "getXMLString()" to "parse(Reader)" also. In the meantime I'm stuck.
null -
Oracle.xml.sql.query.OracleXMLQuery not found
Hi!
Sorry, but I got a project to continue and there is an import statement "import oracle.xml.sql.query.OracleXMLQuery;" and this gives me a compilation error...
What do I need to do, where do I find this class??? Any help?
//PatriciaPatricia,
Did you go through the link
Re: XML SQL Utility
You have to put xsu12.jar in the lib directory of the jdev.
xsu12.jar is in the lib directory of the XDK installation.
You can download XDK from
http://www.oracle.com/technology/tech/xml/xdk/software/prod/xdk_java.html
Just download the XDK kit, get the xsu12.jar from the lib directory and put in the lib directory of the jdev.
-- Arvind -
How to find out responsibility attached for particular user through query
hi
How to find out responsibility attached for particular user through query
Regards
9841672839Hi,
Following sql will help you find the responsibilities associated with the users in oracle applications.
SELECT frt.RESPONSIBILITY_NAME, furg.end_date
FROM
fnd_user_resp_groups furg,
FND_RESPONSIBILITY fr,
fnd_responsibility_tl frt,
fnd_user fu
WHERE fu.user_name = ‘&&username’
AND fu.user_id = furg.user_id
AND furg.responsibility_id = fr.RESPONSIBILITY_ID
AND frt.responsibility_id = fr.RESPONSIBILITY_ID
ORDER BY 1
Cheers... -
How to load date and time from text file to oracle table through sqlloader
hi friends
i need you to show me what i miss to load date and time from text file to oracle table through sqlloader
this is my data in this path (c:\external\my_data.txt)
7369,SMITH,17-NOV-81,09:14:04,CLERK,20
7499,ALLEN,01-MAY-81,17:06:08,SALESMAN,30
7521,WARD,09-JUN-81,17:06:30,SALESMAN,30
7566,JONES,02-APR-81,09:24:10,MANAGER,20
7654,MARTIN,28-SEP-81,17:24:10,SALESMAN,30my table in database emp2
create table emp2 (empno number,
ename varchar2(20),
hiredate date,
etime date,
ejob varchar2(20),
deptno number);the control file code in this path (c:\external\ctrl.ctl)
load data
infile 'C:\external\my_data.txt'
into table emp2
fields terminated by ','
(empno, ename, hiredate, etime, ejob, deptno)this is the error :
C:\>sqlldr scott/tiger control=C:\external\ctrl.ctl
SQL*Loader: Release 10.2.0.1.0 - Production on Mon May 31 09:45:10 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Commit point reached - logical record count 5
C:\>any help i greatly appreciated
thanks
Edited by: user10947262 on May 31, 2010 9:47 AMload data
infile 'C:\external\my_data.txt'
into table emp2
fields terminated by ','
(empno, ename, hiredate, etime, ejob, deptno)Try
load data
infile 'C:\external\my_data.txt'
into table emp2
fields terminated by ','
(empno, ename, hiredate, etime "to_date(:etime,'hh24:mi:ss')", ejob, deptno)
this is the error :
C:\>sqlldr scott/tiger control=C:\external\ctrl.ctl
SQL*Loader: Release 10.2.0.1.0 - Production on Mon May 31 09:45:10 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Commit point reached - logical record count 5
C:\>
That's not an error, you can see errors within log and bad files. -
Can Power Users or Mgt Create and Design Reports Through Query Designer ?
Dear BI consultants,
Iam new to BI.
My management has requested me to Train Power users from All Modules(FICO,HR,QM,PP,SD,MM) to Create Queries and Design Through Query Designer.
My question is are we suppose to Give query Designer Access to Power users or Mgt so that they can create Queries and reports by themselves.Please Suggest me wht is the Best Practices.
is it feasable to train power users and Mgt as to how 2 create queries. will there be any side effect on the System or our end.
Plz suggest.
wht are the advantages and disadvantages of this.
If I train the Power users then is there any risk of my Job.
since they will be creating all reports by themselves.
wht else can a BI consultant do since iam in a support project.
how do i convince my Mgt?
Plz Suggest.
Thanks AwaitingThis is common procedure maintained in most of the company's for end users.
There is no issue if you train the power users.you will be the first point of contact if they have any doubts.and more over you are supporting for your client right? this can't be handed over to power user or end user. data is imp for the client so there will not be any problem for you, if any issue comes while loading you need to take care of the errors and fix the.
power users or end user will be familiar with Business requirement not with the Query building logic's not with the BW procedure so no worries for you.
as vineeth said its better to keep control regarding the global and key things at your end so that you will not loose contol on the reports. -
How do I migrate views from MS SQL 2008 to Oracle 11g through SQL Developer
Is there any way to migrate the views from MS SQL 2008 to Oracle 11g through SQL Developer? Please give me some detail steps. Thanks for your help.
KevinHi Kevin,
user13531850 wrote:
Hi Turloch,
When I use migrate to oracle, I got a problem, the migrate tool create a new schema for me in my case (AZTECA_KSMMS), it migrates all the stuffs under that schema (AZTECA_KSMMS). However my application need the all the Oracle data under schema AZTECA instead of AZTECA_KSMMS. Is there any way to specify specific schema (AZTECA) for target oracle database? Schema remapping is available:
First Capture (separately) then during right click convert on the captured model there is a Specify the conversion options with a Object Naming tab where the schema (and other) name changes are editable.
I have not used this recently.
Also during the migration process, when I choose repository, there is a check box for truncate to reset repository to empty state, Do I need to check that truncate Check Box so the repository will be cleared from last migration?The repository can hold multple migration attempts. Check truncate to get rid of previous attempts information. This cleans up the repository - not the destination database.
There are also online database and offline database options during the migration process, what are the difference between these two choices? After I migrated to Oracle, all my views has a red cross icon next to it. Does that mean the view migration is failed or not? Please give me your comments. Thanks for your help.offline: for big (amount of data) databases with simple data types,
uses bcp + files + scripts + sqlldr.
online: for small (amount of data) databases (easier),
uses (Java) jdbc.
The view is likely to be broken - recompiling it may help.
The Oracle schema is created using a .sql file - see under generated in the directory you gave originally in the wizard. There is a .out file that contains the result of running this script including any errors. During conversion there are also likely to be warnings displayed on the UI.
There may be a single issue that is causing multiple issues - if viewa depends on functionb, and functionb is broken, viewa will also fail.
>
Kevin-Turloch
SQLDeveloper Team -
Problem in connecting to oracle DB through NWDS
Hi All,
I cannot establish a connection to the oracle DB through the below mentioned code written in webdynpro java. I am new to this area.
Please check what is wrong with this code and suggest me how to resolve this......I have pasted the classes12.jar in the lib folder.
import oracle.jdbc.driver.OracleDriver;
ResultSet resSet = null;
Statement Stat = null;
Connection conn = null;
PreparedStatement pstmt= null;
String url = "jdbc:oracle:thin:@local server:1521:SID";
String user = "ABC";
String password = "123";
try
conn = DriverManager.getConnection(url,user,password);
Stat = conn.createStatement();
pstmt = conn.prepareStatement("Select * from tablename");
resSet = pstmt.executeQuery();
wdComponentAPI.getMessageManager().reportSuccess("Result"+resSet);
if (resSet != null)
resSet.close(); // close ResultSet
Stat.close(); // close Statement
conn.close();
catch (Exception e)
e.printStackTrace();
Regards,
Athulya.Hi ,
import oracle.jdbc.driver.OracleDriver;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.Statement;
ResultSet resSet = null;
Statement Stat = null;
Connection conn = null;
PreparedStatement pstmt= null;
String url = "jdbc:oracle:thin:@local server:1521:SID";
String user = "ABC";
String password = "123";
try
conn = DriverManager.getConnection(url,user,password);
Stat = conn.createStatement();
pstmt = conn.prepareStatement("Select * from tablename");
resSet = pstmt.executeQuery();
wdComponentAPI.getMessageManager().reportSuccess("Result"+resSet);
if (resSet != null)
resSet.close(); // close ResultSet
Stat.close(); // close Statement
conn.close();
catch (Exception e)
e.printStackTrace();
Regards,
Athulya -
Issue while fetching the file through *.extension by FTP sender file adapte
Hello Experts,
I am facing a issue while fetching the data through sender File adapter with ' *.file extension' .I am illustarting the scenario as below .
It is a simple scenarion of File to File inboumd scenarion.Here file is getting picked up from a third party system
through FTP sender chanel and stored in a temp folder of PI through NFS rceiver file adapter .
The problem is however I am getting, while picking the file with file name as "*.exo"(where exo is the file extension).
But while fetching the file with particular name like"abcd_10032011*.exo"(file naming has been done by combination of abcd(always same)_currentdate(change according to current date)),file picked successfully .
So here ,in the prior case file not getting picked up,but in later case it dose .
Can anyone please let me know what might be the issue?Hi Sunit,
Connect from your PI System to 3rd Party System (where are placed the Source Files)
FTP <PartySystemHostName>
eg. FTP 10.2.3.456 (then insert Username & Password to Login)
Go to source directory
cd \<SourceDirectory>
eg. cd \donaldduck\directory\
Execute a File List command
ls -la *.<extension>
eg. ls -la *.exo
In this way you should be able to view all files with this extension (*.exo), the same action that Sap XI perform to pickup the file.
Then, try to copy that file to your Local PI System (to check if there're some permissions issue):
mget <filename>.exo
eg. mpget File1_01012011.exo -
Oracle Text contain query limit with 9i
The Oracle Text contain query is defined as this:
CONTAINS(
[schema.]column,
text_query VARCHAR2
[,label NUMBER])
RETURN NUMBER;
Is the size limit of text_query 4000 bytes with 9i? Is it increased with 10g or is it accepting CLOB in 10g?
I always got the error: "ORA-01460: unimplemented or unreasonable conversion requested" when I do the following where p_var was dynamically passed with size of more than 4000 bytes:
p_statement varchar2(20000);
p_var varchar2(8000);
p_statement := select count(*) from dewey_table where contains(concat, :x)>0;
open m_cursor for p_statement using p_var;
Thanks very much,
KevinThe limit is definitely 4000 characters in 9i and the 10g documentation shows no change in the calling spec for that parameter.
-
Upload the excel file in oracle db through oracle forms
Hi all,
I want to upload the excel file in oracle db through oracle forms...I am new to oracle forms .
I have searched a lot but not getting exact solution
Is there anyone who will help me out with this .....
Any help will be appriciatedI'm trying to move data from excel into an Oracle forms field. This involves coping 2 columns of data cells in excel and pasting it into an Oracle forms field. I can get the date pasted into the Oracle forms field but there is a invisible character that separates the 2 columns of data coming from Excel. I do not know what this character is but it is causing the error 'Line 1 is invalid. Check forms'.
Any ideas how to get pass this?
Thank you -
Alphabetical fetching from an SQL Query
Hello,
When I fetch from the following query:
v_sql := 'SELECT REFERENCE_NO, COMPANY_NAME
FROM CONSULTANTS
ORDER BY COMPANY_NAME';
The company names are in alphabetical order
Something like:
A
B
C
D
etc..
Z
then AFTER the capital letters come the a, b c
Z
then
a
then
b
etc..
Is there a way to have the lower case letters such as "a" come right after ALL the "A"s
Then the b's come after the B's
Thanks
DougSQL> select col from (
2 select 'a' col from dual
3 union all
4 select 'b' from dual
5 union all
6 select 'd' from dual
7 union all
8 select 'C' from dual
9 union all
10 select 'B' from dual
11 union all
12 select 'A' from dual
13 )
14 /
C
a
b
d
C
B
A
6 rows selected.
SQL> select col from (
2 select 'a' col from dual
3 union all
4 select 'b' from dual
5 union all
6 select 'd' from dual
7 union all
8 select 'C' from dual
9 union all
10 select 'B' from dual
11 union all
12 select 'A' from dual
13 )
14 order by upper(col), col
15 /
C
A
a
B
b
C
d
6 rows selected.Rgds. -
Oracle date parameter query not working?
http://stackoverflow.com/questions/14539489/oracle-date-parameter-query-not-working
Trying to run the below query, but always fails even though the parameter values matches. I'm thinking there is a precision issue for :xRowVersion_prev parameter. I want too keep as much precision as possible.
Delete
from CONCURRENCYTESTITEMS
where ITEMID = :xItemId
and ROWVERSION = :xRowVersion_prev
The Oracle Rowversion is a TimestampLTZ and so is the oracle parameter type.
The same code & query works in Sql Server, but not Oracle.
Public Function CreateConnection() As IDbConnection
Dim sl As New SettingsLoader
Dim cs As String = sl.ObtainConnectionString
Dim cn As OracleConnection = New OracleConnection(cs)
cn.Open()
Return cn
End Function
Public Function CreateCommand(connection As IDbConnection) As IDbCommand
Dim cmd As OracleCommand = DirectCast(connection.CreateCommand, OracleCommand)
cmd.BindByName = True
Return cmd
End Function
<TestMethod()>
<TestCategory("Oracle")> _
Public Sub Test_POC_Delete()
Dim connection As IDbConnection = CreateConnection()
Dim rowver As DateTime = DateTime.Now
Dim id As Decimal
Using cmd As IDbCommand = CreateCommand(connection)
cmd.CommandText = "insert into CONCURRENCYTESTITEMS values(SEQ_CONCURRENCYTESTITEMS.nextval,'bla bla bla',:xRowVersion) returning ITEMID into :myOutputParameter"
Dim p As OracleParameter = New OracleParameter
p.Direction = ParameterDirection.ReturnValue
p.DbType = DbType.Decimal
p.ParameterName = "myOutputParameter"
cmd.Parameters.Add(p)
Dim v As OracleParameter = New OracleParameter
v.Direction = ParameterDirection.Input
v.OracleDbType = OracleDbType.TimeStampLTZ
v.ParameterName = "xRowVersion"
v.Value = rowver
cmd.Parameters.Add(v)
cmd.ExecuteNonQuery()
id = CType(p.Value, Decimal)
End Using
Using cmd As IDbCommand = m_DBTypesFactory.CreateCommand(connection)
cmd.CommandText = " Delete from CONCURRENCYTESTITEMS where ITEMID = :xItemId and ROWVERSION = :xRowVersion_prev"
Dim p As OracleParameter = New OracleParameter
p.Direction = ParameterDirection.Input
p.DbType = DbType.Decimal
p.ParameterName = "xItemId"
p.Value = id
cmd.Parameters.Add(p)
Dim v As OracleParameter = New OracleParameter
v.Direction = ParameterDirection.Input
v.OracleDbType = OracleDbType.TimeStampLTZ
v.ParameterName = "xRowVersion_prev"
v.Value = rowver
v.Precision = 6 '????
cmd.Parameters.Add(v)
Dim cnt As Integer = cmd.ExecuteNonQuery()
If cnt = 0 Then Assert.Fail() 'should delete
End Using
connection.Close()
End Sub
Schema:
-- ****** Object: Table SYSTEM.CONCURRENCYTESTITEMS Script Date: 1/26/2013 11:56:50 AM ******
CREATE TABLE "CONCURRENCYTESTITEMS" (
"ITEMID" NUMBER(19,0) NOT NULL,
"NOTES" NCHAR(200) NOT NULL,
"ROWVERSION" TIMESTAMP(6) WITH LOCAL TIME ZONE NOT NULL)
STORAGE (
NEXT 1048576 )
Sequence:
-- ****** Object: Sequence SYSTEM.SEQ_CONCURRENCYTESTITEMS Script Date: 1/26/2013 12:12:48 PM ******
CREATE SEQUENCE "SEQ_CONCURRENCYTESTITEMS"
START WITH 1
CACHE 20
MAXVALUE 9999999999999999999999999999still not comming...
i have one table each entry is having only one fromdata and one todate only
i am running below in sql it is showing two rows. ok.
select t1.U_frmdate,t1.U_todate ,ISNULL(t2.firstName,'')+ ',' +ISNULL(t2.middleName ,'')+','+ISNULL(t2.lastName,'') AS NAME, T2.empID AS EMPID, T2.U_emp AS Empticket,t2.U_PFAcc,t0.U_pf
from [@PR_PRCSAL1] t0 inner join [@PR_OPRCSAL] t1
on t0.DocEntry = t1.DocEntry
inner join ohem t2
on t2.empID = t0.U_empid where t0.U_empid between '830' and '850' and t1.U_frmdate ='20160801' and t1.u_todate='20160830'
in commond promt
select t1.U_frmdate,t1.U_todate ,ISNULL(t2.firstName,'')+ ',' +ISNULL(t2.middleName ,'')+','+ISNULL(t2.lastName,'') AS NAME, T2.empID AS EMPID, T2.U_emp AS Empticket,t2.U_PFAcc,t0.U_pf
from [@PR_PRCSAL1] t0 inner join [@PR_OPRCSAL] t1
on t0.DocEntry = t1.DocEntry
inner join ohem t2
on t2.empID = t0.U_empid where t0.U_empid between {?FromEmid} and {?ToEmid} and t1.U_frmdate ={?FDate} and t1.u_todate={?TDate}
still not showing any results.. -
Code to run a query in SQL from Access with pass through query
I have a query in SQL Server 2008:
[Auto Null Up Date].sql. I want to run this query from Access 2007 using a Pass Through Query. What is the command/code to run this query from Access? I have used Pass Through Queries but never in this capacity so I am somewhat lost. I have
already established the OBDC link and tested.Naomi,
Here are a few lines of the SQLCMD code in the [Auto Null Update].sql query:
USE [Archive Master]
Go
:r "\\10.200.1.60\c$\Users\bkreft\My Documents\SQL Server Management Studio\Projects\Null BackPress 2 update.sql"
GO
:r "\\10.200.1.60\c$\Users\bkreft\My Documents\SQL Server Management Studio\Projects\Null CHWR 3 update.sql"
GO
:r "\\10.200.1.60\c$\Users\bkreft\My Documents\SQL Server Management Studio\Projects\Null CHWR 4 update.sql"
When this code is pasted into a Create Procedure, (the USE [Archive Master] is not used), the procedure will run, but once saved here is what is left of the procedure once I attempt to modify:
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:
<Author,,Name>
-- Create date: <Create Date,,>
-- Description:
<Description,,>
-- =============================================
Create PROCEDURE [dbo].[NullTest2]
AS
Maybe you are looking for
-
Can't play more than 15 swf files on a page
My web site has a page that has over 15 swf sound files on it. Safari won't play the sounds when buttons pushed. See here... http://classicalmusicproject.com/Learning%20the%20Pieces%20Sept%2018/1-10/1-10.h tml Yet when I have less than 15 swf's on a
-
Ctrl-Clic combination not working
Hi! I'm developing dashboards in Oracle BPM Studio 10.3.1, in the properties tab I selected a method on the onClic property, but when the user clics twice on the graphic it shows a gray screen and the user has to exit the screen and excecute the glob
-
Landing page/splash screen auto redirect after x seconds
Hi Guys! I'd like to create a landing page or splash screen which autodirects the user to the main index of the site after x seconds, with some kind of javascript or other HTML snippet code (I'm not capable of and I do not want any Flash). Thanks for
-
Printing a Vector to a JTextArea
I'm having major problems with my project. I can't get the information retrieved from a database to print to a JTable even though i've looked at so many different tutorials. I ended up printing the information to a JTextArea for now but i'm having pr
-
Downloading images from camera
I have tried to download images direct from my camera but get the message no photographs. I then tried a card reader - no luck still the same message. I took the memory card to a local well known camera shop thinking that I had lost the images, they